From e823fe589190d2c03e632973839db66739ccdb20 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 2 Apr 2020 16:20:53 +0400 Subject: [PATCH] Fix support / media shortcuts. --- Telegram/SourceFiles/core/shortcuts.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/core/shortcuts.cpp b/Telegram/SourceFiles/core/shortcuts.cpp index f8c10e4ee8..2907dcf832 100644 --- a/Telegram/SourceFiles/core/shortcuts.cpp +++ b/Telegram/SourceFiles/core/shortcuts.cpp @@ -427,7 +427,6 @@ void Manager::set(const QString &keys, Command command, bool replace) { } else if (replace) { unregister(std::exchange(i->second, std::move(shortcut))); } else { - shortcut = nullptr; id = i->second->id(); } if (!id) { @@ -435,10 +434,10 @@ void Manager::set(const QString &keys, Command command, bool replace) { return; } _commandByShortcutId.emplace(id, command); - if (shortcut && isMediaShortcut) { + if (!shortcut && isMediaShortcut) { _mediaShortcuts.emplace(i->second.get()); } - if (shortcut && isSupportShortcut) { + if (!shortcut && isSupportShortcut) { _supportShortcuts.emplace(i->second.get()); } }