diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat index 049052937..c69285256 100644 --- a/Telegram/PrepareWin.bat +++ b/Telegram/PrepareWin.bat @@ -1,9 +1,9 @@ @echo OFF -set "AppVersion=7021" -set "AppVersionStrSmall=0.7.21" -set "AppVersionStr=0.7.21" -set "AppVersionStrFull=0.7.21.0" +set "AppVersion=7022" +set "AppVersionStrSmall=0.7.22" +set "AppVersionStr=0.7.22" +set "AppVersionStrFull=0.7.22.0" set "DevChannel=1" if %DevChannel% neq 0 goto preparedev diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index ab09edea6..c06eefd0e 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -653,10 +653,10 @@ void Application::checkMapVersion() { psRegisterCustomScheme(); if (Local::oldMapVersion()) { QString versionFeatures; - if (DevChannel && Local::oldMapVersion() < 7021) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Reply to specific messages in groups\n\xe2\x80\x94 Mention @usernames in groups to notify multiple users"); + if (DevChannel && Local::oldMapVersion() < 7022) { + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Critical bug with messages delivery fixed"); } else if (!DevChannel && Local::oldMapVersion() < 7020) { - versionFeatures = lang(lng_new_version7020).trimmed(); + versionFeatures = lang(lng_new_version7022).trimmed(); } if (!versionFeatures.isEmpty()) { versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog")); diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 39f7ec6f2..84f5ac67d 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 7021; -static const wchar_t *AppVersionStr = L"0.7.21"; +static const int32 AppVersion = 7022; +static const wchar_t *AppVersionStr = L"0.7.22"; static const bool DevChannel = true; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index c1a5fcaf3..eba95a619 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2234,6 +2234,7 @@ void MainWidget::clearSkippedPtsUpdates() { _byPtsSentMessage.clear(); _byPtsStatedMessage.clear(); _byPtsStatedMessages.clear(); + updSkipPtsUpdateLevel = 0; } bool MainWidget::updPtsUpdated(int pts, int ptsCount) { // return false if need to save that update and apply later @@ -2700,11 +2701,13 @@ void MainWidget::handleUpdates(const MTPUpdates &updates) { case mtpc_updateShortMessage: { const MTPDupdateShortMessage &d(updates.c_updateShortMessage()); + if (!App::userLoaded(d.vuser_id.v)) { + return getDifference(); + } if (!updPtsUpdated(d.vpts.v, d.vpts_count.v)) { _byPtsUpdates.insert(ptsKey(SkippedUpdates), updates); return; } - if (!App::userLoaded(d.vuser_id.v)) return getDifference(); bool out = (d.vflags.v & MTPDmessage_flag_out); HistoryItem *item = App::histories().addToBack(MTP_message(d.vflags, d.vid, out ? MTP_int(MTP::authedId()) : d.vuser_id, MTP_peerUser(out ? d.vuser_id : MTP_int(MTP::authedId())), d.vfwd_from_id, d.vfwd_date, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty())); if (item) { @@ -2716,11 +2719,13 @@ void MainWidget::handleUpdates(const MTPUpdates &updates) { case mtpc_updateShortChatMessage: { const MTPDupdateShortChatMessage &d(updates.c_updateShortChatMessage()); + if (!App::chatLoaded(d.vchat_id.v) || !App::userLoaded(d.vfrom_id.v) || (d.has_fwd_from_id() && !App::userLoaded(d.vfwd_from_id.v))) { + return getDifference(); + } if (!updPtsUpdated(d.vpts.v, d.vpts_count.v)) { _byPtsUpdates.insert(ptsKey(SkippedUpdates), updates); return; } - if (!App::chatLoaded(d.vchat_id.v) || !App::userLoaded(d.vfrom_id.v) || (d.has_fwd_from_id() && !App::userLoaded(d.vfwd_from_id.v))) return getDifference(); HistoryItem *item = App::histories().addToBack(MTP_message(d.vflags, d.vid, d.vfrom_id, MTP_peerChat(d.vchat_id), d.vfwd_from_id, d.vfwd_date, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty())); if (item) { history.peerMessagesUpdated(item->history()->peer->id); diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 3e6f3e176..6a068fc85 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.7.21 + 0.7.22 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index e8c9357a0..144453eb7 100644 Binary files a/Telegram/Telegram.rc and b/Telegram/Telegram.rc differ diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 6b2337d76..72e5b3638 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1667,7 +1667,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.21; + CURRENT_PROJECT_VERSION = 0.7.22; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1685,7 +1685,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.7.21; + CURRENT_PROJECT_VERSION = 0.7.22; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1711,10 +1711,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.21; + CURRENT_PROJECT_VERSION = 0.7.22; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.7; - DYLIB_CURRENT_VERSION = 0.7.21; + DYLIB_CURRENT_VERSION = 0.7.22; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1852,10 +1852,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.7.21; + CURRENT_PROJECT_VERSION = 0.7.22; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.7; - DYLIB_CURRENT_VERSION = 0.7.21; + DYLIB_CURRENT_VERSION = 0.7.22; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; diff --git a/Telegram/Version.sh b/Telegram/Version.sh index 8a8386167..be36d47da 100755 --- a/Telegram/Version.sh +++ b/Telegram/Version.sh @@ -1,2 +1,2 @@ -echo 7021 0.7.21 1 +echo 7022 0.7.22 1 # AppVersion AppVersionStr DevChannel