mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
feat: avoid closing context menu/reaction selector with CTRL/SHIFT
This commit is contained in:
@@ -43,6 +43,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
// AyuGram includes
|
// AyuGram includes
|
||||||
#include "ayu/ui/context_menu/context_menu.h"
|
#include "ayu/ui/context_menu/context_menu.h"
|
||||||
#include "ayu/ayu_settings.h"
|
#include "ayu/ayu_settings.h"
|
||||||
|
#include "ayu/utils/qt_key_modifiers_extended.h"
|
||||||
|
|
||||||
|
|
||||||
namespace HistoryView::Reactions {
|
namespace HistoryView::Reactions {
|
||||||
@@ -1415,7 +1416,9 @@ AttachSelectorResult AttachSelectorToMenu(
|
|||||||
const auto itemId = item->fullId();
|
const auto itemId = item->fullId();
|
||||||
|
|
||||||
selector->chosen() | rpl::on_next([=](ChosenReaction reaction) {
|
selector->chosen() | rpl::on_next([=](ChosenReaction reaction) {
|
||||||
menu->hideMenu();
|
if (!base::IsExtendedContextMenuModifierPressed()) {
|
||||||
|
menu->hideMenu();
|
||||||
|
}
|
||||||
reaction.context = itemId;
|
reaction.context = itemId;
|
||||||
chosen(std::move(reaction));
|
chosen(std::move(reaction));
|
||||||
}, selector->lifetime());
|
}, selector->lifetime());
|
||||||
|
|||||||
Reference in New Issue
Block a user