Initial support for read receipts
This commit is contained in:
parent
44ee1b549d
commit
eaf05748ff
19 changed files with 434 additions and 33 deletions
|
|
@ -87,6 +87,7 @@ public:
|
|||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
|
@ -116,6 +117,9 @@ private:
|
|||
|
||||
DescInfo descriptionMsg_;
|
||||
|
||||
QMenu *receiptsMenu_;
|
||||
QAction *showReadReceipts_;
|
||||
|
||||
QHBoxLayout *topLayout_;
|
||||
QVBoxLayout *sideLayout_; // Avatar or Timestamp
|
||||
QVBoxLayout *mainLayout_; // Header & Message body
|
||||
|
|
@ -156,7 +160,7 @@ TimelineItem::setupLocalWidgetLayout(Widget *widget,
|
|||
setupAvatarLayout(displayName);
|
||||
mainLayout_->addLayout(headerLayout_);
|
||||
|
||||
AvatarProvider::resolve(userid, this);
|
||||
AvatarProvider::resolve(userid, [=](const QImage &img) { setUserAvatar(img); });
|
||||
} else {
|
||||
setupSimpleLayout();
|
||||
}
|
||||
|
|
@ -199,7 +203,7 @@ TimelineItem::setupWidgetLayout(Widget *widget,
|
|||
|
||||
mainLayout_->addLayout(headerLayout_);
|
||||
|
||||
AvatarProvider::resolve(sender, this);
|
||||
AvatarProvider::resolve(sender, [=](const QImage &img) { setUserAvatar(img); });
|
||||
} else {
|
||||
setupSimpleLayout();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue