mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Added ability to set shortcut to open section with scheduled messages.
This commit is contained in:
@@ -105,6 +105,7 @@ const auto CommandByName = base::flat_map<QString, Command>{
|
||||
{ u"message_silently"_q , Command::SendSilentMessage },
|
||||
{ u"message_scheduled"_q , Command::ScheduleMessage },
|
||||
{ u"media_viewer_video_fullscreen"_q , Command::MediaViewerFullscreen },
|
||||
{ u"show_scheduled"_q , Command::ShowScheduled },
|
||||
//
|
||||
};
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ enum class Command {
|
||||
FolderNext,
|
||||
FolderPrevious,
|
||||
|
||||
ShowScheduled,
|
||||
|
||||
ShowArchive,
|
||||
ShowContacts,
|
||||
|
||||
|
||||
@@ -1915,6 +1915,14 @@ void HistoryWidget::setupShortcuts() {
|
||||
controller()->searchInChat(_history);
|
||||
return true;
|
||||
});
|
||||
_canSendMessages
|
||||
&& request->check(Command::ShowScheduled, 1)
|
||||
&& request->handle([=] {
|
||||
using Scheduled = HistoryView::ScheduledMemento;
|
||||
controller()->showSection(
|
||||
std::make_shared<Scheduled>(_history));
|
||||
return true;
|
||||
});
|
||||
if (session().supportMode()) {
|
||||
request->check(
|
||||
Command::SupportToggleMuted
|
||||
|
||||
Reference in New Issue
Block a user