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

Apply language with app restart if logged in.

Confirm and restart if logged in, just quickly apply if not.
This commit is contained in:
John Preston
2017-05-30 20:58:25 +03:00
parent d51fd7b3ad
commit 665a1acfd8
14 changed files with 138 additions and 68 deletions

View File

@@ -33,6 +33,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "storage/localstorage.h"
#include "boxes/confirm_box.h"
#include "lang/lang_keys.h"
#include "lang/lang_cloud_manager.h"
#include "messenger.h"
#include "mtproto/mtp_instance.h"
#include "mtproto/dc_options.h"
@@ -61,7 +62,7 @@ void fillCodes() {
}));
});
Codes.insert(qsl("loadlang"), [] {
Lang::Current().chooseCustomFile();
Lang::CurrentCloudManager().switchToLanguage(qsl("custom"));
});
Codes.insert(qsl("debugfiles"), [] {
if (!cDebug()) return;