Handle poll questions rendered as a standalone emoji

This commit is contained in:
evgeny committed 2026-10-07 17:33:26 +02:00
1 parent c3d05e4e08
commit da4d567aa8
2 files changed
+30 -2

No files matched your search

+2 -1
View File
@@ -144,7 +144,8 @@ bool MessageDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
const bool onReaction = mouse->button() == Qt::LeftButton && reaction != -2;
const bool onAvatar=mouse->button()==Qt::LeftButton && !L.narrow && L.avatarRect.contains(mouse->pos()-option.rect.topLeft());
const bool onPoll = index.data(MsgContentTypeRole).toString() == "poll"
&& !index.data(MsgChannelIdRole).toString().startsWith("dm:") && L.bubbleRect.contains(point)
&& !index.data(MsgChannelIdRole).toString().startsWith("dm:")
&& (L.bubbleRect.contains(point) || L.emojiArea.contains(point))
&& (!L.reactionHeart.isValid() || point.y() < L.reactionHeart.top());
if (event->type()==QEvent::MouseButtonPress) {
m_reactionPress = onReaction ? index : QModelIndex(); m_pressedReaction = reaction; m_reactionPressPosition = mouse->pos();