mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-23 06:02:49 +02:00
fix: hide panel if reactions are hidden
This commit is contained in:
parent
2eee51f891
commit
1586386d6c
1 changed files with 6 additions and 5 deletions
|
@ -1189,11 +1189,6 @@ bool AdjustMenuGeometryForSelector(
|
|||
not_null<Ui::PopupMenu*> menu,
|
||||
QPoint desiredPosition,
|
||||
not_null<Selector*> selector) {
|
||||
const auto &settings = AyuSettings::getInstance();
|
||||
if (!AyuUi::needToShowItem(settings.showReactionsPanelInContextMenu)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto useTransparency = selector->useTransparency();
|
||||
const auto extend = useTransparency
|
||||
? st::reactStripExtend
|
||||
|
@ -1362,6 +1357,12 @@ AttachSelectorResult AttachSelectorToMenu(
|
|||
return AttachSelectorResult::Skipped;
|
||||
}
|
||||
|
||||
const auto peer = item->history()->peer;
|
||||
if ((peer->isChannel() && !peer->isMegagroup() && !settings.hideChannelReactions)
|
||||
|| (peer->isMegagroup() && !settings.hideGroupReactions)) {
|
||||
return AttachSelectorResult::Skipped;
|
||||
}
|
||||
|
||||
const auto result = AttachSelectorToMenu(
|
||||
menu,
|
||||
desiredPosition,
|
||||
|
|
Loading…
Add table
Reference in a new issue