2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

Retranslate Settings when language is changed.

Also suggest user to change language from 'en' to his for one time.
This commit is contained in:
John Preston
2017-04-18 20:37:14 +03:00
parent f5dfeb0c50
commit 3f0b57ec11
17 changed files with 183 additions and 59 deletions

View File

@@ -87,9 +87,9 @@ void LanguageBox::Inner::languageChanged(int languageIndex) {
}
void LanguageBox::prepare() {
refreshLangItems();
refreshLang();
subscribe(Lang::Current().updated(), [this] {
refreshLangItems();
refreshLang();
});
_inner = setInnerWidget(object_ptr<Inner>(this, &_languages), st::boxLayerScroll);
@@ -100,7 +100,7 @@ void LanguageBox::prepare() {
});
}
void LanguageBox::refreshLangItems() {
void LanguageBox::refreshLang() {
clearButtons();
addButton(lang(lng_box_ok), [this] { closeBox(); });