mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-11 09:19:35 +00:00
Remove 'Send without sound' in Saved messages.
This commit is contained in:
parent
451056d2ab
commit
66bf48e21e
@ -801,7 +801,7 @@ void SetupSendMenu(
|
|||||||
}
|
}
|
||||||
|
|
||||||
*menu = base::make_unique_q<Ui::PopupMenu>(button);
|
*menu = base::make_unique_q<Ui::PopupMenu>(button);
|
||||||
if (silent) {
|
if (silent && now != SendMenuType::Reminder) {
|
||||||
(*menu)->addAction(tr::lng_send_silent_message(tr::now), silent);
|
(*menu)->addAction(tr::lng_send_silent_message(tr::now), silent);
|
||||||
}
|
}
|
||||||
if (schedule && now != SendMenuType::SilentOnly) {
|
if (schedule && now != SendMenuType::SilentOnly) {
|
||||||
|
@ -303,7 +303,7 @@ HistoryWidget::HistoryWidget(
|
|||||||
|
|
||||||
SetupSendMenu(
|
SetupSendMenu(
|
||||||
_send,
|
_send,
|
||||||
[=] { return sendMenuType(); },
|
[=] { return sendButtonMenuType(); },
|
||||||
[=] { sendSilent(); },
|
[=] { sendSilent(); },
|
||||||
[=] { sendScheduled(); });
|
[=] { sendScheduled(); });
|
||||||
|
|
||||||
@ -2987,16 +2987,20 @@ void HistoryWidget::sendScheduled() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SendMenuType HistoryWidget::sendMenuType() const {
|
SendMenuType HistoryWidget::sendMenuType() const {
|
||||||
if (_send->type() != Ui::SendButton::Type::Send
|
return !_peer
|
||||||
|| _send->isDisabled()
|
? SendMenuType::Disabled
|
||||||
|| !_peer) {
|
: _peer->isSelf()
|
||||||
return SendMenuType::Disabled;
|
|
||||||
}
|
|
||||||
return _peer->isSelf()
|
|
||||||
? SendMenuType::Reminder
|
? SendMenuType::Reminder
|
||||||
: SendMenuType::Scheduled;
|
: SendMenuType::Scheduled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SendMenuType HistoryWidget::sendButtonMenuType() const {
|
||||||
|
return ((_send->type() != Ui::SendButton::Type::Send)
|
||||||
|
|| _send->isDisabled())
|
||||||
|
? SendMenuType::Disabled
|
||||||
|
: sendMenuType();
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryWidget::unblockUser() {
|
void HistoryWidget::unblockUser() {
|
||||||
if (const auto user = _peer ? _peer->asUser() : nullptr) {
|
if (const auto user = _peer ? _peer->asUser() : nullptr) {
|
||||||
Window::PeerMenuUnblockUserWithBotRestart(user);
|
Window::PeerMenuUnblockUserWithBotRestart(user);
|
||||||
|
@ -368,6 +368,7 @@ private:
|
|||||||
void sendSilent();
|
void sendSilent();
|
||||||
void sendScheduled();
|
void sendScheduled();
|
||||||
[[nodiscard]] SendMenuType sendMenuType() const;
|
[[nodiscard]] SendMenuType sendMenuType() const;
|
||||||
|
[[nodiscard]] SendMenuType sendButtonMenuType() const;
|
||||||
void handlePendingHistoryUpdate();
|
void handlePendingHistoryUpdate();
|
||||||
void fullPeerUpdated(PeerData *peer);
|
void fullPeerUpdated(PeerData *peer);
|
||||||
void toggleTabbedSelectorMode();
|
void toggleTabbedSelectorMode();
|
||||||
|
Loading…
Reference in New Issue
Block a user