mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Added ability to set shortcut to open section with scheduled messages.
This commit is contained in:
parent
24498bc95f
commit
5509c1810b
3 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue