From a7c29991db3de6a8c5719e2d7cb7c38438ab0e2e Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 19 Sep 2022 18:49:46 +0400 Subject: [PATCH] Hide toggle silent send in channels on msg edit. --- Telegram/SourceFiles/history/history_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 5aac12247..ed125deb9 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -2776,7 +2776,7 @@ void HistoryWidget::updateControlsVisibility() { _botMenuButton->show(); } if (_silent) { - _silent->show(); + _silent->setVisible(!_editMsgId); } if (_scheduled) { _scheduled->show(); @@ -4836,7 +4836,7 @@ void HistoryWidget::updateFieldSize() { if (_sendAs) fieldWidth -= _sendAs->width(); if (kbShowShown) fieldWidth -= _botKeyboardShow->width(); if (_cmdStartShown) fieldWidth -= _botCommandStart->width(); - if (_silent) fieldWidth -= _silent->width(); + if (_silent && !_silent->isHidden()) fieldWidth -= _silent->width(); if (_scheduled) fieldWidth -= _scheduled->width(); if (_ttlInfo) fieldWidth -= _ttlInfo->width();