Skip to content

Commit

Permalink
Require that at least one unread message exists in memory to count as…
Browse files Browse the repository at this point in the history
… `has_unread`.
  • Loading branch information
andymandias committed Sep 18, 2024
1 parent 45b4eeb commit fee53fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions data/src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,9 @@ impl History {
} => {
// Read marker is prior to last message on disk
// or prior to unflushed messages in memory
metadata.read_marker.is_none()
|| last_on_disk
.zip(metadata.read_marker)
.map_or(false, |(a, b)| a > b.date_time())
last_on_disk
.zip(metadata.read_marker)
.map_or(false, |(a, b)| a > b.date_time())
|| metadata.unread_count(messages) > 0
}
History::Full { .. } => false,
Expand Down

0 comments on commit fee53fd

Please sign in to comment.