2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Move terms lock from Core::App to Session.

This commit is contained in:
John Preston
2020-06-24 11:56:16 +04:00
parent 30c82bb2e0
commit e7b8a52278
19 changed files with 233 additions and 272 deletions

View File

@@ -44,6 +44,7 @@ class Domain;
namespace Window {
class SessionController;
struct TermsLock;
} // namespace Window
namespace Calls {
@@ -135,7 +136,13 @@ public:
return *_calls;
}
// Terms lock.
void lockByTerms(const Window::TermsLock &data);
void unlockTerms();
void termsDeleteNow();
[[nodiscard]] std::optional<Window::TermsLock> termsLocked() const;
rpl::producer<bool> termsLockChanges() const;
rpl::producer<bool> termsLockValue() const;
[[nodiscard]] QString createInternalLink(const QString &query) const;
[[nodiscard]] QString createInternalLinkFull(const QString &query) const;
@@ -177,6 +184,9 @@ private:
std::shared_ptr<Data::CloudImageView> _selfUserpicView;
rpl::event_stream<bool> _termsLockChanges;
std::unique_ptr<Window::TermsLock> _termsLock;
base::flat_set<not_null<Window::SessionController*>> _windows;
base::Timer _saveSettingsTimer;