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

Use Qt UI language if system was not determined.

Also rename platform/mac/specific_mac.cpp to .mm
This commit is contained in:
John Preston
2017-05-30 12:31:32 +03:00
parent 6fb980ca79
commit f5353080e7
13 changed files with 119 additions and 49 deletions

View File

@@ -780,11 +780,12 @@ void ConnectionPrivate::tryToSend() {
MTPInitConnection<mtpRequest> initWrapper;
int32 initSize = 0, initSizeInInts = 0;
if (needsLayer) {
auto langCode = sessionData->langCode();
auto systemLangCode = sessionData->systemLangCode();
auto cloudLangCode = sessionData->cloudLangCode();
auto langPack = "tdesktop";
auto deviceModel = (_dcType == DcType::Cdn) ? "n/a" : cApiDeviceModel();
auto systemVersion = (_dcType == DcType::Cdn) ? "n/a" : cApiSystemVersion();
initWrapper = MTPInitConnection<mtpRequest>(MTP_int(ApiId), MTP_string(deviceModel), MTP_string(systemVersion), MTP_string(cApiAppVersion()), MTP_string(langCode), MTP_string(langPack), MTP_string(langCode), mtpRequest());
initWrapper = MTPInitConnection<mtpRequest>(MTP_int(ApiId), MTP_string(deviceModel), MTP_string(systemVersion), MTP_string(cApiAppVersion()), MTP_string(systemLangCode), MTP_string(langPack), MTP_string(cloudLangCode), mtpRequest());
initSizeInInts = (initWrapper.innerLength() >> 2) + 2;
initSize = initSizeInInts * sizeof(mtpPrime);
}