From b962efeca3d7fecc0da14e6bfc8eacc228371a01 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 3 Jan 2023 09:59:42 +0400 Subject: [PATCH] Allow ctrl+6/7/8 to activate extra pinned chats. Fixes #25647. --- Telegram/SourceFiles/core/shortcuts.cpp | 3 +++ Telegram/SourceFiles/core/shortcuts.h | 3 +++ Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/core/shortcuts.cpp b/Telegram/SourceFiles/core/shortcuts.cpp index fce2fbc43..91c79525b 100644 --- a/Telegram/SourceFiles/core/shortcuts.cpp +++ b/Telegram/SourceFiles/core/shortcuts.cpp @@ -370,6 +370,9 @@ void Manager::fillDefaults() { set(u"ctrl+3"_q, Command::ChatPinned3); set(u"ctrl+4"_q, Command::ChatPinned4); set(u"ctrl+5"_q, Command::ChatPinned5); + set(u"ctrl+6"_q, Command::ChatPinned6); + set(u"ctrl+7"_q, Command::ChatPinned7); + set(u"ctrl+8"_q, Command::ChatPinned8); auto &&folders = ranges::views::zip( kShowFolder, diff --git a/Telegram/SourceFiles/core/shortcuts.h b/Telegram/SourceFiles/core/shortcuts.h index ef1d16486..94448a093 100644 --- a/Telegram/SourceFiles/core/shortcuts.h +++ b/Telegram/SourceFiles/core/shortcuts.h @@ -34,6 +34,9 @@ enum class Command { ChatPinned3, ChatPinned4, ChatPinned5, + ChatPinned6, + ChatPinned7, + ChatPinned8, ShowAllChats, ShowFolder1, diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 70b415a9a..6d376e1c4 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -3739,6 +3739,9 @@ void InnerWidget::setupShortcuts() { Command::ChatPinned3, Command::ChatPinned4, Command::ChatPinned5, + Command::ChatPinned6, + Command::ChatPinned7, + Command::ChatPinned8, }; auto &&pinned = ranges::views::zip( kPinned,