mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix language and theme writing / reading.
This commit is contained in:
parent
f450f81215
commit
dddd355f6c
2 changed files with 6 additions and 4 deletions
|
@ -1100,10 +1100,12 @@ void LanguageBox::prepare() {
|
|||
) | rpl::start_with_next([=](const Language &language) {
|
||||
// "#custom" is applied each time it's passed to switchToLanguage().
|
||||
// So we check that the language really has changed.
|
||||
if (language.id != Lang::Current().id()) {
|
||||
const auto currentId = Lang::LanguageIdOrDefault(
|
||||
Lang::Current().id());
|
||||
if (language.id != currentId) {
|
||||
Lang::CurrentCloudManager().switchToLanguage(language);
|
||||
if (inner) {
|
||||
inner->changeChosen(Lang::Current().id());
|
||||
inner->changeChosen(currentId);
|
||||
}
|
||||
}
|
||||
}, inner->lifetime());
|
||||
|
|
|
@ -368,10 +368,10 @@ void start() {
|
|||
_oldSettingsVersion = settingsData.version;
|
||||
_settingsSalt = salt;
|
||||
|
||||
applyReadContext(std::move(context));
|
||||
|
||||
InitialLoadTheme();
|
||||
readLangPack();
|
||||
|
||||
applyReadContext(std::move(context));
|
||||
}
|
||||
|
||||
void writeSettings() {
|
||||
|
|
Loading…
Add table
Reference in a new issue