mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
One Window::Notifications system for all sessions.
This commit is contained in:
@@ -99,6 +99,7 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
, _fallbackProductionConfig(
|
||||
std::make_unique<MTP::Config>(MTP::Environment::Production))
|
||||
, _domain(std::make_unique<Main::Domain>(cDataFile()))
|
||||
, _notifications(std::make_unique<Window::Notifications::System>())
|
||||
, _langpack(std::make_unique<Lang::Instance>())
|
||||
, _langCloudManager(std::make_unique<Lang::CloudManager>(langpack()))
|
||||
, _emojiKeywords(std::make_unique<ChatHelpers::EmojiKeywords>())
|
||||
@@ -116,6 +117,11 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
_shouldLockAt = 0;
|
||||
}, _lifetime);
|
||||
|
||||
passcodeLockChanges(
|
||||
) | rpl::start_with_next([=] {
|
||||
_notifications->updateAll();
|
||||
}, _lifetime);
|
||||
|
||||
_domain->activeSessionChanges(
|
||||
) | rpl::start_with_next([=](Main::Session *session) {
|
||||
if (session && !UpdaterDisabled()) { // #TODO multi someSessionValue
|
||||
|
Reference in New Issue
Block a user