Indicate and sort on rooms with unread messages (#205)

Fixes #83
This commit is contained in:
Ulyssa 2024-02-28 09:03:28 -08:00 committed by GitHub
parent 3ed87aae05
commit a2a708f1ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 271 additions and 64 deletions

View file

@ -1342,7 +1342,9 @@ impl<'a> StatefulWidget for Scrollback<'a> {
state.cursor.timestamp.is_none()
{
// If the cursor is at the last message, then update the read marker.
info.read_till = info.messages.last_key_value().map(|(k, _)| k.1.clone());
if let Some((k, _)) = info.messages.last_key_value() {
info.set_receipt(settings.profile.user_id.clone(), k.1.clone());
}
}
// Check whether we should load older messages for this room.