mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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_silently"_q , Command::SendSilentMessage },
|
||||||
{ u"message_scheduled"_q , Command::ScheduleMessage },
|
{ u"message_scheduled"_q , Command::ScheduleMessage },
|
||||||
{ u"media_viewer_video_fullscreen"_q , Command::MediaViewerFullscreen },
|
{ u"media_viewer_video_fullscreen"_q , Command::MediaViewerFullscreen },
|
||||||
|
{ u"show_scheduled"_q , Command::ShowScheduled },
|
||||||
//
|
//
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@ enum class Command {
|
||||||
FolderNext,
|
FolderNext,
|
||||||
FolderPrevious,
|
FolderPrevious,
|
||||||
|
|
||||||
|
ShowScheduled,
|
||||||
|
|
||||||
ShowArchive,
|
ShowArchive,
|
||||||
ShowContacts,
|
ShowContacts,
|
||||||
|
|
||||||
|
|
|
@ -1915,6 +1915,14 @@ void HistoryWidget::setupShortcuts() {
|
||||||
controller()->searchInChat(_history);
|
controller()->searchInChat(_history);
|
||||||
return true;
|
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()) {
|
if (session().supportMode()) {
|
||||||
request->check(
|
request->check(
|
||||||
Command::SupportToggleMuted
|
Command::SupportToggleMuted
|
||||||
|
|
Loading…
Add table
Reference in a new issue