diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 449d1fc2e..1b2a0fdd7 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,9,0 - PRODUCTVERSION 0,10,9,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.9.0" + VALUE "FileVersion", "0.10.11.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.9.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 a3d19de62..def0bd48c 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,9,0 - PRODUCTVERSION 0,10,9,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.9.0" + VALUE "FileVersion", "0.10.11.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.10.9.0" + VALUE "ProductVersion", "0.10.11.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index dc9014f69..b3f648c80 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -304,9 +304,8 @@ void Application::readClients() { if (!startUrl.isEmpty()) { cSetStartUrl(startUrl); } - if (!cStartUrl().isEmpty() && App::main() && App::self()) { - App::main()->openLocalUrl(cStartUrl()); - cSetStartUrl(QString()); + if (auto main = App::main()) { + main->checkStartUrl(); } } diff --git a/Telegram/SourceFiles/boxes/report_box.cpp b/Telegram/SourceFiles/boxes/report_box.cpp index e845390cc..42cb287ff 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 6505e548a..5c49b9b9d 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 = 10009; -constexpr str_const AppVersionStr = "0.10.9"; +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 5c15dc4f3..50d10940a 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/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 37ac2441b..a84d6bec3 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -3301,10 +3301,7 @@ void MainWidget::start(const MTPUser &user) { App::feedUsers(MTP_vector(1, user)); MTP::send(MTPupdates_GetState(), rpcDone(&MainWidget::gotState)); update(); - if (!cStartUrl().isEmpty()) { - openLocalUrl(cStartUrl()); - cSetStartUrl(QString()); - } + _started = true; App::wnd()->sendServiceHistoryRequest(); Local::readInstalledStickers(); @@ -3312,12 +3309,23 @@ void MainWidget::start(const MTPUser &user) { Local::readRecentStickers(); Local::readSavedGifs(); _history->start(); + + checkStartUrl(); } bool MainWidget::started() { return _started; } +void MainWidget::checkStartUrl() { + if (!cStartUrl().isEmpty() && App::self() && !App::passcoded()) { + auto url = cStartUrl(); + cSetStartUrl(QString()); + + openLocalUrl(url); + } +} + void MainWidget::openLocalUrl(const QString &url) { auto urlTrimmed = url.trimmed(); if (urlTrimmed.size() > 8192) urlTrimmed = urlTrimmed.mid(0, 8192); diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 84fb26380..a6d3547ee 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -155,6 +155,7 @@ public: void start(const MTPUser &user); + void checkStartUrl(); void openLocalUrl(const QString &str); void openPeerByName(const QString &name, MsgId msgId = ShowAtUnreadMsgId, const QString &startToken = QString()); void joinGroupByHash(const QString &hash); diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index 28abdf2af..1cec31fe9 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -265,6 +265,10 @@ void MainWindow::clearPasscode() { notifyUpdateAll(); title->updateBackButton(); updateGlobalMenu(); + + if (auto main = App::main()) { + main->checkStartUrl(); + } } void MainWindow::setupPasscode(bool anim) { @@ -755,9 +759,8 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *e) { QString url = static_cast(e)->url().toEncoded().trimmed(); if (url.startsWith(qstr("tg://"), Qt::CaseInsensitive)) { cSetStartUrl(url.mid(0, 8192)); - if (!cStartUrl().isEmpty() && App::main() && App::self()) { - App::main()->openLocalUrl(cStartUrl()); - cSetStartUrl(QString()); + if (auto main = App::main()) { + main->checkStartUrl(); } } activate(); diff --git a/Telegram/SourceFiles/ui/effects/fade_animation.cpp b/Telegram/SourceFiles/ui/effects/fade_animation.cpp index 5e2663a5d..2c5cee26a 100644 --- a/Telegram/SourceFiles/ui/effects/fade_animation.cpp +++ b/Telegram/SourceFiles/ui/effects/fade_animation.cpp @@ -103,7 +103,7 @@ void FadeAnimation::startAnimation(int duration) { } void FadeAnimation::updateCallback() { - if (_animation.animating(getms())) { + if (_animation.animating()) { _widget->update(); if (_updatedCallback) { _updatedCallback(_animation.current(_visible ? 1. : 0.)); diff --git a/Telegram/build/version b/Telegram/build/version index 209d05a04..6eec02a3c 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,6 +1,6 @@ -AppVersion 10009 +AppVersion 10011 AppVersionStrMajor 0.10 -AppVersionStrSmall 0.10.9 -AppVersionStr 0.10.9 +AppVersionStrSmall 0.10.11 +AppVersionStr 0.10.11 AlphaChannel 0 BetaVersion 0