From db6ed903377ee177dff9f579cad5915305dda58d Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 20 Mar 2015 00:56:13 +0300 Subject: [PATCH] 0.7.22.dev version with fixed messages delivery --- Telegram/PrepareWin.bat | 8 ++++---- Telegram/SourceFiles/application.cpp | 6 +++--- Telegram/SourceFiles/config.h | 4 ++-- Telegram/SourceFiles/mainwidget.cpp | 9 +++++++-- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | Bin 5540 -> 5540 bytes Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version.sh | 2 +- 8 files changed, 24 insertions(+), 19 deletions(-) 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 e8c9357a03af923ae5d59ca7a4074b07499a1ac1..144453eb7098a89420b3b830925b26d3c7179f9a 100644 GIT binary patch delta 53 zcmZ3Yy+nIM5ig_B