2
0
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:
John Preston
2020-06-19 16:59:31 +04:00
parent 83538675ce
commit 997913be25
28 changed files with 578 additions and 297 deletions

View File

@@ -25,7 +25,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "data/data_changes.h"
#include "data/data_user.h"
#include "window/notifications_manager.h"
#include "window/window_session_controller.h"
#include "window/themes/window_theme.h"
//#include "platform/platform_specific.h"
@@ -75,7 +74,6 @@ Session::Session(
, _downloader(std::make_unique<Storage::DownloadManagerMtproto>(_api.get()))
, _uploader(std::make_unique<Storage::Uploader>(_api.get()))
, _storage(std::make_unique<Storage::Facade>())
, _notifications(std::make_unique<Window::Notifications::System>(this))
, _changes(std::make_unique<Data::Changes>(this))
, _data(std::make_unique<Data::Session>(this))
, _user(_data->processUser(user))
@@ -85,11 +83,6 @@ Session::Session(
, _saveSettingsTimer([=] { saveSettings(); }) {
Expects(_settings != nullptr);
Core::App().lockChanges(
) | rpl::start_with_next([=] {
notifications().updateAll();
}, _lifetime);
subscribe(Global::RefConnectionTypeChanged(), [=] {
_api->refreshTopPromotion();
});