2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move lang keys to td_lang library.

This commit is contained in:
John Preston
2020-09-30 12:11:44 +03:00
parent def1266216
commit 8634c1f7f3
41 changed files with 271 additions and 164 deletions

View File

@@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_cloud_themes.h"
#include "data/data_chat_filters.h"
#include "lang/lang_keys.h"
#include "lang/lang_instance.h"
#include "storage/localstorage.h"
#include "main/main_session.h"
#include "main/main_session_settings.h"
@@ -48,10 +49,10 @@ void SetupLanguageButton(
container,
tr::lng_settings_language(),
rpl::single(
Lang::Current().id()
Lang::GetInstance().id()
) | rpl::then(
Lang::Current().idChanges()
) | rpl::map([] { return Lang::Current().nativeName(); }),
Lang::GetInstance().idChanges()
) | rpl::map([] { return Lang::GetInstance().nativeName(); }),
icon ? st::settingsSectionButton : st::settingsButton,
icon ? &st::settingsIconLanguage : nullptr);
const auto guard = Ui::CreateChild<base::binary_guard>(button.get());