mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Remove 'Send without sound' in Saved messages.
This commit is contained in:
@@ -303,7 +303,7 @@ HistoryWidget::HistoryWidget(
|
||||
|
||||
SetupSendMenu(
|
||||
_send,
|
||||
[=] { return sendMenuType(); },
|
||||
[=] { return sendButtonMenuType(); },
|
||||
[=] { sendSilent(); },
|
||||
[=] { sendScheduled(); });
|
||||
|
||||
@@ -2987,16 +2987,20 @@ void HistoryWidget::sendScheduled() {
|
||||
}
|
||||
|
||||
SendMenuType HistoryWidget::sendMenuType() const {
|
||||
if (_send->type() != Ui::SendButton::Type::Send
|
||||
|| _send->isDisabled()
|
||||
|| !_peer) {
|
||||
return SendMenuType::Disabled;
|
||||
}
|
||||
return _peer->isSelf()
|
||||
return !_peer
|
||||
? SendMenuType::Disabled
|
||||
: _peer->isSelf()
|
||||
? SendMenuType::Reminder
|
||||
: SendMenuType::Scheduled;
|
||||
}
|
||||
|
||||
SendMenuType HistoryWidget::sendButtonMenuType() const {
|
||||
return ((_send->type() != Ui::SendButton::Type::Send)
|
||||
|| _send->isDisabled())
|
||||
? SendMenuType::Disabled
|
||||
: sendMenuType();
|
||||
}
|
||||
|
||||
void HistoryWidget::unblockUser() {
|
||||
if (const auto user = _peer ? _peer->asUser() : nullptr) {
|
||||
Window::PeerMenuUnblockUserWithBotRestart(user);
|
||||
|
Reference in New Issue
Block a user