diff options
author | KitsuneRal <Kitsune-Ral@users.sf.net> | 2016-09-21 08:45:53 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-21 08:45:53 +0900 |
commit | 11dd106d8d99c187c22f7a37ce557daf25450e4b (patch) | |
tree | f1413ff18e50beb5e5f8859723b1b4070cdb9ced /room.h | |
parent | ac5ae85ed43d1f92cfc99bf1ea687d33f56ccd13 (diff) | |
parent | b1ca4264f25db826a98455698f1e05babd85eb26 (diff) | |
download | libquotient-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.h | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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); }; } |