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

Support cloud languages list and switching.

Add Lang::Current().updated() observable for retranslating the UI.
This commit is contained in:
John Preston
2017-04-18 18:21:03 +03:00
parent 139d4e72b5
commit f5dfeb0c50
16 changed files with 415 additions and 179 deletions

View File

@@ -38,6 +38,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "history/history_service_layout.h"
#include "overviewwidget.h"
#include "lang/lang_keys.h"
#include "lang/lang_cloud_manager.h"
#include "boxes/add_contact_box.h"
#include "storage/file_upload.h"
#include "messenger.h"
@@ -5689,11 +5690,11 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
////// Cloud langpacks
case mtpc_updateLangPack: {
auto &langpack = update.c_updateLangPack();
Messenger::Instance().mtp()->applyLangPackDifference(langpack.vdifference);
Messenger::Instance().langCloudManager()->applyLangPackDifference(langpack.vdifference);
} break;
case mtpc_updateLangPackTooLong: {
Messenger::Instance().mtp()->requestLangPackDifference();
Messenger::Instance().langCloudManager()->requestLangPackDifference();
} break;
}