summary refs log tree commit diff
path: root/src/timeline/TimelineItem.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 23:50:18 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 23:50:18 +0300
commite4dedbcaba544b8cd9b7fea20ece4dad262b2c34 (patch)
treed80efcc5a10d0d1747d1fd7113010113f0848103 /src/timeline/TimelineItem.h
parentBump version to v0.5.1 (diff)
downloadnheko-e4dedbcaba544b8cd9b7fea20ece4dad262b2c34.tar.xz
Mark own read messages with a double checkmark (#377)
Diffstat (limited to 'src/timeline/TimelineItem.h')
-rw-r--r--src/timeline/TimelineItem.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/timeline/TimelineItem.h b/src/timeline/TimelineItem.h

index d3cab0a0..874c00df 100644 --- a/src/timeline/TimelineItem.h +++ b/src/timeline/TimelineItem.h
@@ -50,6 +50,8 @@ enum class StatusIndicatorState Encrypted, //! The plaintext message was received by the server. Received, + //! At least one of the participants has read the message. + Read, //! The client sent the message. Not yet received. Sent, //! When the message is loaded from cache or backfill. @@ -66,6 +68,7 @@ class StatusIndicator : public QWidget public: explicit StatusIndicator(QWidget *parent); void setState(StatusIndicatorState state); + StatusIndicatorState state() const { return state_; } protected: void paintEvent(QPaintEvent *event) override; @@ -76,6 +79,7 @@ private: QIcon lockIcon_; QIcon clockIcon_; QIcon checkmarkIcon_; + QIcon doubleCheckmarkIcon_; QColor iconColor_ = QColor("#999"); @@ -234,6 +238,7 @@ public: QString eventId() const { return event_id_; } void setEventId(const QString &event_id) { event_id_ = event_id; } void markReceived(bool isEncrypted); + void markRead(); void markSent(); bool isReceived() { return isReceived_; }; void setRoomId(QString room_id) { room_id_ = room_id; } @@ -252,6 +257,8 @@ protected: void contextMenuEvent(QContextMenuEvent *event) override; private: + //! If we are the sender of the message the event wil be marked as received by the server. + void markOwnMessagesAsReceived(const std::string &sender); void init(); //! Add a context menu option to save the image of the timeline item. void addSaveImageAction(ImageItem *image);