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 = [=] {
|
const auto finalize = [=] {
|
||||||
if (canApplyWithoutRestart(language.id)) {
|
if (canApplyWithoutRestart(language.id)) {
|
||||||
performSwitchAndAddToRecent(language);
|
performSwitchAndAddToRecent(language);
|
||||||
|
Lang::Current().fillDefaultJson();
|
||||||
|
Lang::Current().fillFromJson();
|
||||||
} else {
|
} else {
|
||||||
performSwitchAndRestart(language);
|
performSwitchAndRestart(language);
|
||||||
}
|
}
|
||||||
|
|
@ -471,6 +473,8 @@ void CloudManager::switchToLanguage(const Language &data) {
|
||||||
performSwitchToCustom();
|
performSwitchToCustom();
|
||||||
} else if (canApplyWithoutRestart(data.id)) {
|
} else if (canApplyWithoutRestart(data.id)) {
|
||||||
performSwitchAndAddToRecent(data);
|
performSwitchAndAddToRecent(data);
|
||||||
|
Lang::Current().fillDefaultJson();
|
||||||
|
Lang::Current().fillFromJson();
|
||||||
} else {
|
} else {
|
||||||
QVector<MTPstring> keys;
|
QVector<MTPstring> keys;
|
||||||
keys.reserve(3);
|
keys.reserve(3);
|
||||||
|
|
@ -524,6 +528,8 @@ void CloudManager::performSwitchToCustom() {
|
||||||
}
|
}
|
||||||
if (canApplyWithoutRestart(qsl("#custom"))) {
|
if (canApplyWithoutRestart(qsl("#custom"))) {
|
||||||
_langpack.switchToCustomFile(filePath);
|
_langpack.switchToCustomFile(filePath);
|
||||||
|
Lang::Current().fillDefaultJson();
|
||||||
|
Lang::Current().fillFromJson();
|
||||||
} else {
|
} else {
|
||||||
const auto values = loader.found();
|
const auto values = loader.found();
|
||||||
const auto getValue = [&](ushort key) {
|
const auto getValue = [&](ushort key) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue