mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Allow several accounts in Core::App.
This commit is contained in:
@@ -7,9 +7,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "core/changelogs.h"
|
||||
|
||||
#include "storage/storage_account.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "core/application.h"
|
||||
#include "main/main_accounts.h"
|
||||
#include "main/main_session.h"
|
||||
#include "storage/storage_accounts.h"
|
||||
#include "data/data_session.h"
|
||||
#include "mainwindow.h"
|
||||
#include "apiwrap.h"
|
||||
@@ -80,7 +82,9 @@ Changelogs::Changelogs(not_null<Main::Session*> session, int oldVersion)
|
||||
|
||||
std::unique_ptr<Changelogs> Changelogs::Create(
|
||||
not_null<Main::Session*> session) {
|
||||
const auto oldVersion = session->local().oldMapVersion();
|
||||
auto &local = Core::App().accounts().local();
|
||||
const auto oldVersion = local.oldVersion();
|
||||
local.clearOldVersion();
|
||||
return (oldVersion > 0 && oldVersion < AppVersion)
|
||||
? std::make_unique<Changelogs>(session, oldVersion)
|
||||
: nullptr;
|
||||
|
Reference in New Issue
Block a user