mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +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:
@@ -84,18 +84,9 @@ void LanguageBox::Inner::refresh() {
|
||||
void LanguageBox::Inner::languageChanged(int languageIndex) {
|
||||
Expects(languageIndex >= 0 && languageIndex < _languages->size());
|
||||
|
||||
auto currentId = Lang::Current().id();
|
||||
activateCurrent();
|
||||
auto languageId = (*_languages)[languageIndex].id;
|
||||
if (languageId == currentId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (languageId == qsl("custom")) {
|
||||
activateCurrent();
|
||||
Lang::Current().chooseCustomFile();
|
||||
} else {
|
||||
Lang::CurrentCloudManager().switchToLanguage(languageId);
|
||||
}
|
||||
Lang::CurrentCloudManager().switchToLanguage(languageId);
|
||||
}
|
||||
|
||||
void LanguageBox::Inner::activateCurrent() {
|
||||
|
Reference in New Issue
Block a user