Fix applying language without restart
This commit is contained in:
parent
fdb4fa4254
commit
2dc0071b29
1 changed files with 6 additions and 0 deletions
|
|
@ -436,6 +436,8 @@ void CloudManager::sendSwitchingToLanguageRequest() {
|
|||
const auto finalize = [=] {
|
||||
if (canApplyWithoutRestart(language.id)) {
|
||||
performSwitchAndAddToRecent(language);
|
||||
Lang::Current().fillDefaultJson();
|
||||
Lang::Current().fillFromJson();
|
||||
} else {
|
||||
performSwitchAndRestart(language);
|
||||
}
|
||||
|
|
@ -471,6 +473,8 @@ void CloudManager::switchToLanguage(const Language &data) {
|
|||
performSwitchToCustom();
|
||||
} else if (canApplyWithoutRestart(data.id)) {
|
||||
performSwitchAndAddToRecent(data);
|
||||
Lang::Current().fillDefaultJson();
|
||||
Lang::Current().fillFromJson();
|
||||
} else {
|
||||
QVector<MTPstring> keys;
|
||||
keys.reserve(3);
|
||||
|
|
@ -524,6 +528,8 @@ void CloudManager::performSwitchToCustom() {
|
|||
}
|
||||
if (canApplyWithoutRestart(qsl("#custom"))) {
|
||||
_langpack.switchToCustomFile(filePath);
|
||||
Lang::Current().fillDefaultJson();
|
||||
Lang::Current().fillFromJson();
|
||||
} else {
|
||||
const auto values = loader.found();
|
||||
const auto getValue = [&](ushort key) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue