From 1dd1a19b06861e2ab0fc282af143e792080bbbdb Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 3 Oct 2019 18:07:01 +0200 Subject: Update roomlist on new messages --- src/timeline2/TimelineModel.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/timeline2/TimelineModel.h') 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 userColors; QString currentId; + + TimelineViewManager *manager_; }; template -- cgit 1.5.1