diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-22 11:49:09 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-01-22 11:49:09 +0900 |
commit | 0ecfd3897cc3264c21f80a121b4b6774ac2d67f7 (patch) | |
tree | 60b7168d345f1046359a9ca1750212528c3dc4e8 | |
parent | b8db2e9bf3ae6479157e4419fe27600cccd443ed (diff) | |
download | libquotient-0ecfd3897cc3264c21f80a121b4b6774ac2d67f7.tar.gz libquotient-0ecfd3897cc3264c21f80a121b4b6774ac2d67f7.zip |
Room: emit addedMessages() before possible read marker auto-promotion
Read marker auto-promotion may be bound to a dataChanged() signal in the
client model, while a routine connection for addedMessages() is
endInsertRows(). Emitting endInsertRows() after dataChanged() over the
same rows has unpredictable consequences for representation of data in
those rows - hence the fix.
-rw-r--r-- | room.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1141,8 +1141,8 @@ void Room::Private::addNewMessageEvents(RoomEvents&& events) processRedaction(move(r)); if (insertedSize > 0) { - checkUnreadMessages(timeline.cend() - insertedSize); emit q->addedMessages(); + checkUnreadMessages(timeline.cend() - insertedSize); } Q_ASSERT(timeline.size() == timelineSize + insertedSize); |