Create changelogs after data in AuthSession.

This commit is contained in:
John Preston 2018-02-18 16:26:28 +03:00
parent 1dd66184a1
commit f8c2f339a0
2 changed files with 5 additions and 3 deletions

View file

@ -274,8 +274,8 @@ AuthSession::AuthSession(UserId userId)
, _uploader(std::make_unique<Storage::Uploader>())
, _storage(std::make_unique<Storage::Facade>())
, _notifications(std::make_unique<Window::Notifications::System>(this))
, _changelogs(Core::Changelogs::Create(this))
, _data(std::make_unique<Data::Session>(this)) {
, _data(std::make_unique<Data::Session>(this))
, _changelogs(Core::Changelogs::Create(this)) {
Expects(_userId != 0);
_saveDataTimer.setCallback([this] {

View file

@ -258,11 +258,13 @@ private:
const std::unique_ptr<Storage::Uploader> _uploader;
const std::unique_ptr<Storage::Facade> _storage;
const std::unique_ptr<Window::Notifications::System> _notifications;
const std::unique_ptr<Core::Changelogs> _changelogs;
// _data depends on _downloader / _uploader, including destructor.
const std::unique_ptr<Data::Session> _data;
// _changelogs depends on _data, subscribes on chats loading event.
const std::unique_ptr<Core::Changelogs> _changelogs;
rpl::lifetime _lifetime;
};