2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Handle t.me/setlanguage links.

Also support custom langpacks with base langpacks.
This commit is contained in:
John Preston
2018-10-22 15:13:48 +04:00
parent 228fb2f80d
commit 162da089ec
13 changed files with 697 additions and 252 deletions

View File

@@ -4898,12 +4898,16 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
////// Cloud langpacks
case mtpc_updateLangPack: {
auto &langpack = update.c_updateLangPack();
Lang::CurrentCloudManager().applyLangPackDifference(langpack.vdifference);
const auto &data = update.c_updateLangPack();
Lang::CurrentCloudManager().applyLangPackDifference(data.vdifference);
} break;
case mtpc_updateLangPackTooLong: {
Lang::CurrentCloudManager().requestLangPackDifference();
const auto &data = update.c_updateLangPackTooLong();
const auto code = qs(data.vlang_code);
if (!code.isEmpty()) {
Lang::CurrentCloudManager().requestLangPackDifference(code);
}
} break;
}