From b600050057f0d0de5dc9d3c4fbae1f9dab5127ec Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 3 Oct 2016 18:00:54 +0300 Subject: [PATCH] Version 0.10.11: two more crash fixes. --- Telegram/Resources/winrc/Telegram.rc | 8 ++++---- Telegram/Resources/winrc/Updater.rc | 8 ++++---- Telegram/SourceFiles/boxes/report_box.cpp | 2 +- Telegram/SourceFiles/core/version.h | 4 ++-- Telegram/SourceFiles/history/history_message.cpp | 12 +++++++----- Telegram/build/version | 6 +++--- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 2b84c45adf..1b2a0fdd75 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,10,10,0 - PRODUCTVERSION 0,10,10,0 + FILEVERSION 0,10,11,0 + PRODUCTVERSION 0,10,11,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.10.10.0" + VALUE "FileVersion", "0.10.11.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.10.0" + VALUE "ProductVersion", "0.10.11.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 3a100ee90c..def0bd48c6 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,10,10,0 - PRODUCTVERSION 0,10,10,0 + FILEVERSION 0,10,11,0 + PRODUCTVERSION 0,10,11,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Updater" - VALUE "FileVersion", "0.10.10.0" + VALUE "FileVersion", "0.10.11.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.10.0" + VALUE "ProductVersion", "0.10.11.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/boxes/report_box.cpp b/Telegram/SourceFiles/boxes/report_box.cpp index e845390cc1..42cb287ff6 100644 --- a/Telegram/SourceFiles/boxes/report_box.cpp +++ b/Telegram/SourceFiles/boxes/report_box.cpp @@ -83,11 +83,11 @@ void ReportBox::onChange() { connect(_reasonOtherText, SIGNAL(submitted(bool)), this, SLOT(onReport())); connect(_reasonOtherText, SIGNAL(cancelled()), this, SLOT(onClose())); } + _reasonOtherText->setFocus(); } else if (_reasonOtherText) { _reasonOtherText.destroy(); updateMaxHeight(); } - _reasonOtherText->setFocus(); } void ReportBox::doSetInnerFocus() { diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 16c5222200..5c49b9b9d9 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -24,7 +24,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #define BETA_VERSION_MACRO (0ULL) -constexpr int AppVersion = 10010; -constexpr str_const AppVersionStr = "0.10.10"; +constexpr int AppVersion = 10011; +constexpr str_const AppVersionStr = "0.10.11"; constexpr bool AppAlphaVersion = false; constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO; diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index dc23b998d0..b6f0c4bd54 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -2011,10 +2011,11 @@ bool HistoryService::prepareGameScoreText(const QString &from, QString *outText, } else { gameTitle = lang(lng_deleted_message); } + auto scoreNumber = gamescore ? gamescore->score : 0; if (_from->isSelf()) { - *outText = lng_action_game_you_scored(lt_count, gamescore->score, lt_game, gameTitle); + *outText = lng_action_game_you_scored(lt_count, scoreNumber, lt_game, gameTitle); } else { - *outText = lng_action_game_score(lt_from, from, lt_count, gamescore->score, lt_game, gameTitle); + *outText = lng_action_game_score(lt_from, from, lt_count, scoreNumber, lt_game, gameTitle); } if (second) { outLinks->push_back(second); @@ -2212,12 +2213,13 @@ HistoryTextState HistoryService::getState(int x, int y, HistoryStateRequest requ } void HistoryService::createFromMtp(const MTPDmessageService &message) { + if (message.vaction.type() == mtpc_messageActionGameScore) { + UpdateComponents(HistoryServiceGameScore::Bit()); + Get()->score = message.vaction.c_messageActionGameScore().vscore.v; + } if (message.has_reply_to_msg_id()) { if (message.vaction.type() == mtpc_messageActionPinMessage) { UpdateComponents(HistoryServicePinned::Bit()); - } else if (message.vaction.type() == mtpc_messageActionGameScore) { - UpdateComponents(HistoryServiceGameScore::Bit()); - Get()->score = message.vaction.c_messageActionGameScore().vscore.v; } if (auto dependent = GetDependentData()) { dependent->msgId = message.vreply_to_msg_id.v; diff --git a/Telegram/build/version b/Telegram/build/version index 41da4ebe39..6eec02a3c9 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,6 +1,6 @@ -AppVersion 10010 +AppVersion 10011 AppVersionStrMajor 0.10 -AppVersionStrSmall 0.10.10 -AppVersionStr 0.10.10 +AppVersionStrSmall 0.10.11 +AppVersionStr 0.10.11 AlphaChannel 0 BetaVersion 0