optimized avatar and linkify performance, refined navigation to preserve popups, implemented read marker caching, and added file size limits for saving, minor timetable details changes
This commit is contained in:
@@ -107,6 +107,19 @@ class ChatListBloc
|
||||
await refresh();
|
||||
}
|
||||
|
||||
/// Returns the cached `lastReadMessage` for the room with [token], or
|
||||
/// `null` if the room is not (yet) known. Used by [ChatBloc] to skip
|
||||
/// redundant server read-marker calls when the local cache already
|
||||
/// reflects the same position.
|
||||
int? lastReadMessageFor(String token) {
|
||||
final rooms = innerState?.rooms;
|
||||
if (rooms == null) return null;
|
||||
for (final room in rooms.data) {
|
||||
if (room.token == token) return room.lastReadMessage;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Optimistically clears the unread counter for [token] so the tile
|
||||
/// reacts before a refresh roundtrip lands. Server-side mark-as-read
|
||||
/// is the caller's job (see [ChatBloc.sendServerReadMarker]).
|
||||
|
||||
Reference in New Issue
Block a user