summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-15 21:58:57 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-02-15 21:58:57 +0200
commit86280098b49709fed6cc850f8ba28dac0b29c216 (patch)
treec308583ee8dee63f21984ff4ab4d165e350c8128 /include
parent6d08e67abd9c000cc55d85aa1e8808c82e04fffd (diff)
Implement server-side notification count
Diffstat (limited to 'include')
-rw-r--r--include/ChatPage.h2
-rw-r--r--include/RoomInfoListItem.h2
-rw-r--r--include/RoomList.h1
-rw-r--r--include/timeline/TimelineView.h3
-rw-r--r--include/timeline/TimelineViewManager.h1
5 files changed, 4 insertions, 5 deletions
diff --git a/include/ChatPage.h b/include/ChatPage.h
index f784231a..3a11f091 100644
--- a/include/ChatPage.h
+++ b/include/ChatPage.h
@@ -128,6 +128,8 @@ private:
void updateUserMetadata(const std::vector<Collection> &collection);
void retryInitialSync();
+ //! Update the room with the new notification count.
+ void updateRoomNotificationCount(const QString &room_id, uint16_t notification_count);
QHBoxLayout *topLayout_;
Splitter *splitter;
diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h
index 4e3fe0ce..213f0479 100644
--- a/include/RoomInfoListItem.h
+++ b/include/RoomInfoListItem.h
@@ -68,7 +68,7 @@ public:
RoomInfoListItem(QString room_id, mtx::responses::InvitedRoom room, QWidget *parent = 0);
void updateUnreadMessageCount(int count);
- void clearUnreadMessageCount();
+ void clearUnreadMessageCount() { updateUnreadMessageCount(0); };
void setState(QSharedPointer<RoomState> state)
{
state_ = state;
diff --git a/include/RoomList.h b/include/RoomList.h
index 7ceffd22..bcac8094 100644
--- a/include/RoomList.h
+++ b/include/RoomList.h
@@ -76,7 +76,6 @@ public slots:
void updateUnreadMessageCount(const QString &roomid, int count);
void updateRoomDescription(const QString &roomid, const DescInfo &info);
void closeJoinRoomDialog(bool isJoining, QString roomAlias);
- void clearRoomMessageCount(const QString &room_id);
protected:
void paintEvent(QPaintEvent *event) override;
diff --git a/include/timeline/TimelineView.h b/include/timeline/TimelineView.h
index fb7c6485..6e1287c8 100644
--- a/include/timeline/TimelineView.h
+++ b/include/timeline/TimelineView.h
@@ -83,7 +83,7 @@ public:
QWidget *parent = 0);
// Add new events at the end of the timeline.
- int addEvents(const mtx::responses::Timeline &timeline);
+ void addEvents(const mtx::responses::Timeline &timeline);
void addUserMessage(mtx::events::MessageType ty, const QString &msg);
template<class Widget, mtx::events::MessageType MsgType>
@@ -113,7 +113,6 @@ private slots:
signals:
void updateLastTimelineMessage(const QString &user, const DescInfo &info);
- void clearUnreadMessageCount(const QString &room_id);
protected:
void paintEvent(QPaintEvent *event) override;
diff --git a/include/timeline/TimelineViewManager.h b/include/timeline/TimelineViewManager.h
index e3cc311e..74d8588c 100644
--- a/include/timeline/TimelineViewManager.h
+++ b/include/timeline/TimelineViewManager.h
@@ -57,7 +57,6 @@ public:
signals:
void clearRoomMessageCount(QString roomid);
- void unreadMessages(QString roomid, int count);
void updateRoomsLastMessage(const QString &user, const DescInfo &info);
public slots: