mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 08:05:12 +00:00
Fix language switch in not-authed window.
This commit is contained in:
@@ -1100,12 +1100,13 @@ void LanguageBox::prepare() {
|
|||||||
) | rpl::start_with_next([=](const Language &language) {
|
) | rpl::start_with_next([=](const Language &language) {
|
||||||
// "#custom" is applied each time it's passed to switchToLanguage().
|
// "#custom" is applied each time it's passed to switchToLanguage().
|
||||||
// So we check that the language really has changed.
|
// So we check that the language really has changed.
|
||||||
const auto currentId = Lang::LanguageIdOrDefault(
|
const auto currentId = [] {
|
||||||
Lang::Current().id());
|
return Lang::LanguageIdOrDefault(Lang::Current().id());
|
||||||
if (language.id != currentId) {
|
};
|
||||||
|
if (language.id != currentId()) {
|
||||||
Lang::CurrentCloudManager().switchToLanguage(language);
|
Lang::CurrentCloudManager().switchToLanguage(language);
|
||||||
if (inner) {
|
if (inner) {
|
||||||
inner->changeChosen(currentId);
|
inner->changeChosen(currentId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, inner->lifetime());
|
}, inner->lifetime());
|
||||||
|
Submodule Telegram/lib_ui updated: d6e7aa6f63...566f301636
Reference in New Issue
Block a user