Workaround for emoji selector in popup menu on Windows.

This commit is contained in:
John Preston 2023-03-17 14:22:22 +04:00
parent 8b61cf1ee3
commit f3951157d7
2 changed files with 8 additions and 1 deletions

View File

@ -945,6 +945,9 @@ AttachSelectorResult MakeJustSelectorMenu(
if (!AdjustMenuGeometryForSelector(menu, desiredPosition, selector)) {
return AttachSelectorResult::Failed;
}
if (mode != ChatHelpers::EmojiListMode::RecentReactions) {
Ui::Platform::FixPopupMenuNativeEmojiPopup(menu);
}
const auto selectorInnerTop = menu->preparedPadding().top()
- st::reactStripExtend.top();
menu->animatePhaseValue(
@ -1006,6 +1009,7 @@ AttachSelectorResult AttachSelectorToMenu(
if (reactions.recent.empty() && !reactions.morePremiumAvailable) {
return AttachSelectorResult::Skipped;
}
const auto withSearch = reactions.customAllowed;
const auto selector = Ui::CreateChild<Selector>(
menu.get(),
controller,
@ -1015,6 +1019,9 @@ AttachSelectorResult AttachSelectorToMenu(
if (!AdjustMenuGeometryForSelector(menu, desiredPosition, selector)) {
return AttachSelectorResult::Failed;
}
if (withSearch) {
Ui::Platform::FixPopupMenuNativeEmojiPopup(menu);
}
const auto selectorInnerTop = selector->useTransparency()
? (menu->preparedPadding().top() - st::reactStripExtend.top())
: st::lineWidth;

@ -1 +1 @@
Subproject commit bcb56492c4cab204b8b27d762586e4bdbcc6c074
Subproject commit 328b75a311cd8f50c2b75dfefa7443e6eafcb9e1