aboutsummaryrefslogtreecommitdiff
path: root/room.h
diff options
context:
space:
mode:
authorKitsuneRal <Kitsune-Ral@users.sf.net>2016-09-21 08:45:53 +0900
committerGitHub <noreply@github.com>2016-09-21 08:45:53 +0900
commit11dd106d8d99c187c22f7a37ce557daf25450e4b (patch)
treef1413ff18e50beb5e5f8859723b1b4070cdb9ced /room.h
parentac5ae85ed43d1f92cfc99bf1ea687d33f56ccd13 (diff)
parentb1ca4264f25db826a98455698f1e05babd85eb26 (diff)
downloadlibquotient-11dd106d8d99c187c22f7a37ce557daf25450e4b.tar.gz
libquotient-11dd106d8d99c187c22f7a37ce557daf25450e4b.zip
Merge pull request #30 from Fxrh/fix-messages-ordering
Fix messages ordering
Diffstat (limited to 'room.h')
-rw-r--r--room.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/room.h b/room.h
index 8f6a65a6..1c29aa01 100644
--- a/room.h
+++ b/room.h
@@ -82,13 +82,17 @@ namespace QMatrixClient
void userRenamed(User* user, QString oldName);
signals:
- void newMessage(Event* event);
+ void aboutToAddHistoricalMessages(const Events& events);
+ void aboutToAddNewMessages(const Events& events);
+ void addedMessages();
+
/**
- * Triggered when the room name, canonical alias or other aliases
- * change. Not triggered when displayname changes.
+ * @brief The room name, the canonical alias or other aliases changed
+ *
+ * Not triggered when displayname changes.
*/
void namesChanged(Room* room);
- /** Triggered only for changes in the room displayname. */
+ /** @brief The room displayname changed */
void displaynameChanged(Room* room);
void topicChanged();
void userAdded(User* user);
@@ -101,13 +105,17 @@ namespace QMatrixClient
protected:
Connection* connection() const;
- virtual void processMessageEvent(Event* event);
- virtual void processStateEvent(Event* event);
+ virtual void doAddNewMessageEvents(const Events& events);
+ virtual void doAddHistoricalMessageEvents(const Events& events);
+ virtual void processStateEvents(const Events& events);
virtual void processEphemeralEvent(Event* event);
private:
class Private;
Private* d;
+
+ void addNewMessageEvents(const Events& events);
+ void addHistoricalMessageEvents(const Events& events);
};
}