mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Not applying draft if can't write a message. Closed beta 9049005.
This commit is contained in:
parent
b20245c8c8
commit
16bea47979
Telegram
Resources/winrc
SourceFiles
build
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
@ -858,6 +858,7 @@ private:
|
||||
void updateFieldSize();
|
||||
|
||||
bool historyHasNotFreezedUnreadBar(History *history) const;
|
||||
bool canWriteMessage() const;
|
||||
|
||||
void clearInlineBot();
|
||||
void inlineBotChanged();
|
||||
|
@ -3,4 +3,4 @@ AppVersionStrMajor 0.9
|
||||
AppVersionStrSmall 0.9.49
|
||||
AppVersionStr 0.9.49
|
||||
AlphaChannel 0
|
||||
BetaVersion 9049004
|
||||
BetaVersion 9049005
|
||||
|
Loading…
Reference in New Issue
Block a user