diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index e721792ddd..8cb84d1f9c 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,9,49,4 - PRODUCTVERSION 0,9,49,4 + FILEVERSION 0,9,49,5 + PRODUCTVERSION 0,9,49,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.49.4" + VALUE "FileVersion", "0.9.49.5" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.49.4" + VALUE "ProductVersion", "0.9.49.5" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 99a67db219..2458b9a0a1 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,9,49,4 - PRODUCTVERSION 0,9,49,4 + FILEVERSION 0,9,49,5 + PRODUCTVERSION 0,9,49,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -43,10 +43,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileDescription", "Telegram Updater" - VALUE "FileVersion", "0.9.49.4" + VALUE "FileVersion", "0.9.49.5" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.49.4" + VALUE "ProductVersion", "0.9.49.5" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index a3b1a79b8b..9429f63b08 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "core/basic_types.h" -#define BETA_VERSION_MACRO (9049004ULL) +#define BETA_VERSION_MACRO (9049005ULL) constexpr int AppVersion = 9049; constexpr str_const AppVersionStr = "0.9.49"; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 36f4e57e7f..49cfa7ad48 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -3821,7 +3821,7 @@ void HistoryWidget::fastShowAtEnd(History *h) { void HistoryWidget::applyDraft(bool parseLinks) { auto draft = _history ? _history->draft() : nullptr; - if (!draft) { + if (!draft || !canWriteMessage()) { clearFieldText(); _field.setFocus(); _replyEditMsg = nullptr; @@ -4218,6 +4218,13 @@ bool HistoryWidget::reportSpamSettingFail(const RPCError &error, mtpRequestId re return true; } +bool HistoryWidget::canWriteMessage() const { + if (!_history || _a_show.animating()) return false; + if (isBlocked() || isJoinChannel() || isMuteUnmute() || isBotStart()) return false; + if (!_canSendMessages) return false; + return true; +} + void HistoryWidget::updateControlsVisibility() { if (!_a_show.animating()) { _topShadow.setVisible(_peer ? true : false); @@ -5564,7 +5571,7 @@ bool HistoryWidget::botCallbackFail(BotCallbackInfo info, const RPCError &error, } bool HistoryWidget::insertBotCommand(const QString &cmd, bool specialGif) { - if (!_history || !_canSendMessages) return false; + if (!_history || !canWriteMessage()) return false; bool insertingInlineBot = !cmd.isEmpty() && (cmd.at(0) == '@'); QString toInsert = cmd; diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 7305899af9..c4dc325b7f 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -858,6 +858,7 @@ private: void updateFieldSize(); bool historyHasNotFreezedUnreadBar(History *history) const; + bool canWriteMessage() const; void clearInlineBot(); void inlineBotChanged(); diff --git a/Telegram/build/version b/Telegram/build/version index 343508822d..c692774d51 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.49 AppVersionStr 0.9.49 AlphaChannel 0 -BetaVersion 9049004 +BetaVersion 9049005