From b1271c6af512b0a8a92bf3242c9ea75e8316ad30 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Fri, 31 Jul 2020 03:10:35 +0300 Subject: [PATCH] Fixed emoji panel opening in scheduled messages Fixes #86. --- .../history/view/history_view_compose_controls.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp index c43d26298..3e556a056 100644 --- a/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp @@ -625,6 +625,15 @@ void ComposeControls::init() { cancelEditMessage(); }, _wrap->lifetime()); } + + HoverEmojiPanelChanges( + ) | rpl::start_with_next([=] { + if (_window->hasTabbedSelectorOwnership()) { + createTabbedPanel(); + } else { + setTabbedPanel(nullptr); + } + }, _wrap->lifetime()); } void ComposeControls::setTextFromEditingMessage(not_null item) { @@ -822,7 +831,9 @@ void ComposeControls::setTabbedPanel( std::unique_ptr panel) { _tabbedPanel = std::move(panel); if (const auto raw = _tabbedPanel.get()) { - _tabbedSelectorToggle->installEventFilter(raw); + if (HoverEmojiPanel()) { + _tabbedSelectorToggle->installEventFilter(raw); + } _tabbedSelectorToggle->setColorOverrides(nullptr, nullptr, nullptr); } else { _tabbedSelectorToggle->setColorOverrides(