Open user avatar galleries from desktop messages
This commit is contained in:
1 parent
9970b2235c
commit
3a793e25b3
3 files changed
+12
No files matched your search
@@ -134,6 +134,12 @@ bool MessageDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
|
||||
if (event->type() != QEvent::MouseButtonRelease) return false;
|
||||
Layout L = calcLayout(option, index);
|
||||
|
||||
const auto* mouse = static_cast<QMouseEvent*>(event);
|
||||
if (mouse->button() == Qt::LeftButton && !L.narrow && L.avatarRect.contains(mouse->pos() - option.rect.topLeft())) {
|
||||
emit avatarRequested(index.data(MsgChannelIdRole).toString(), index.data(MsgAuthorNodeIdRole).toULongLong());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (L.isVideo) {
|
||||
int dlState = index.data(MsgFileDownloadStateRole).toInt();
|
||||
|
||||
|
||||
Reference in new issue
Block a user