From 71af76e438c1cb89a1730fd54ed1c931b2d72fdc Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sun, 11 Sep 2022 03:37:33 +0300 Subject: [PATCH] [Improvement] Allow to change pinned messages shortcuts --- Telegram/SourceFiles/core/shortcuts.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Telegram/SourceFiles/core/shortcuts.cpp b/Telegram/SourceFiles/core/shortcuts.cpp index d5fa5da74..c976f1486 100644 --- a/Telegram/SourceFiles/core/shortcuts.cpp +++ b/Telegram/SourceFiles/core/shortcuts.cpp @@ -113,6 +113,12 @@ const auto CommandByName = base::flat_map{ { qsl("jump_to_date") , Command::JumpToDate }, { qsl("reload_lang") , Command::ReloadLang }, { qsl("restart_app") , Command::Restart }, + + { qsl("pinned_1") , Command::ChatPinned1 }, + { qsl("pinned_2") , Command::ChatPinned2 }, + { qsl("pinned_3") , Command::ChatPinned3 }, + { qsl("pinned_4") , Command::ChatPinned4 }, + { qsl("pinned_5") , Command::ChatPinned5 }, }; const auto CommandNames = base::flat_map{ @@ -157,6 +163,13 @@ const auto CommandNames = base::flat_map{ { Command::JumpToDate , u"jump_to_date"_q }, { Command::ReloadLang , u"reload_lang"_q }, { Command::Restart , u"restart_app"_q }, + + + { Command::ChatPinned1 , u"pinned_1"_q }, + { Command::ChatPinned2 , u"pinned_2"_q }, + { Command::ChatPinned3 , u"pinned_3"_q }, + { Command::ChatPinned4 , u"pinned_4"_q }, + { Command::ChatPinned5 , u"pinned_5"_q }, }; [[maybe_unused]] constexpr auto kNoValue = {