diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index ae3d720..7e37214 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -7612,7 +7612,7 @@ namespace QuickMedia { for(; last_timeline_message >= 0; --last_timeline_message) { BodyItem *item = body_items[last_timeline_message].get(); Message *message = static_cast<Message*>(item->userdata); - if(message && message_is_timeline(message) && !message->event_id.empty()) + if(message && message_is_timeline(message) && !message->event_id.empty() && message->timestamp != timestamp_provisional_event) break; } @@ -7627,7 +7627,8 @@ namespace QuickMedia { Message *read_message = get_latest_message_in_edit_chain(static_cast<Message*>(body_items[last_timeline_message]->userdata)); // TODO: What if two messages have the same timestamp? - if(!read_message->event_id.empty() && read_message->timestamp > current_room->last_read_message_timestamp) { + // Oops, fuckup. If provisional timestamp then overwrite it. + if(!read_message->event_id.empty() && (read_message->timestamp > current_room->last_read_message_timestamp || current_room->last_message_timestamp == timestamp_provisional_event)) { matrix_chat_page->set_room_as_read(current_room); current_room->last_read_message_timestamp = read_message->timestamp; // TODO: What if the message is no longer valid? |