summary refs log tree commit diff
path: root/src/timeline2/TimelineModel.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-10-03 18:07:01 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-11-23 20:06:15 +0100
commit1dd1a19b06861e2ab0fc282af143e792080bbbdb (patch)
treed3500ab1ab15c6d7f24371ce9ab7c1d1562c0195 /src/timeline2/TimelineModel.h
parentReenable redactions (diff)
downloadnheko-1dd1a19b06861e2ab0fc282af143e792080bbbdb.tar.xz
Update roomlist on new messages
Diffstat (limited to 'src/timeline2/TimelineModel.h')
-rw-r--r--src/timeline2/TimelineModel.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/timeline2/TimelineModel.h b/src/timeline2/TimelineModel.h

index ffe5aecb..9b861010 100644 --- a/src/timeline2/TimelineModel.h +++ b/src/timeline2/TimelineModel.h
@@ -108,6 +108,8 @@ struct DecryptionResult bool isDecrypted = false; }; +class TimelineViewManager; + class TimelineModel : public QAbstractListModel { Q_OBJECT @@ -115,7 +117,7 @@ class TimelineModel : public QAbstractListModel int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) public: - explicit TimelineModel(QString room_id, QObject *parent = 0); + explicit TimelineModel(TimelineViewManager *manager, QString room_id, QObject *parent = 0); enum Roles { @@ -145,6 +147,7 @@ public: Q_INVOKABLE QString displayName(QString id) const; Q_INVOKABLE QString avatarUrl(QString id) const; Q_INVOKABLE QString formatDateSeparator(QDate date) const; + Q_INVOKABLE QString escapeEmoji(QString str) const; Q_INVOKABLE void viewRawMessage(QString id) const; Q_INVOKABLE void replyAction(QString id); @@ -204,6 +207,8 @@ private: QHash<QString, QColor> userColors; QString currentId; + + TimelineViewManager *manager_; }; template<class T>