2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move App::histories to Data::Session.

This commit is contained in:
John Preston
2019-01-03 16:36:01 +04:00
parent 0d6a36e187
commit 1f8626b383
49 changed files with 1479 additions and 1366 deletions

View File

@@ -377,8 +377,7 @@ AuthSession &Auth() {
}
AuthSession::AuthSession(const MTPUser &user)
: _user(App::user(user.match([](const auto &data) { return data.vid.v; })))
, _autoLockTimer([this] { checkAutoLock(); })
: _autoLockTimer([this] { checkAutoLock(); })
, _api(std::make_unique<ApiWrap>(this))
, _calls(std::make_unique<Calls::Instance>())
, _downloader(std::make_unique<Storage::Downloader>())
@@ -386,13 +385,9 @@ AuthSession::AuthSession(const MTPUser &user)
, _storage(std::make_unique<Storage::Facade>())
, _notifications(std::make_unique<Window::Notifications::System>(this))
, _data(std::make_unique<Data::Session>(this))
, _user(_data->user(user))
, _changelogs(Core::Changelogs::Create(this))
, _supportHelper(
(Support::ValidateAccount(user)
? std::make_unique<Support::Helper>(this)
: nullptr)) {
App::feedUser(user);
, _supportHelper(Support::Helper::Create(this)) {
_saveDataTimer.setCallback([=] {
Local::writeUserSettings();
});
@@ -515,4 +510,7 @@ Support::Templates& AuthSession::supportTemplates() const {
return supportHelper().templates();
}
AuthSession::~AuthSession() = default;
AuthSession::~AuthSession() {
ClickHandler::clearActive();
ClickHandler::unpressed();
}