diff --git a/lib/pages/chat/events/message_time.dart b/lib/pages/chat/events/message_time.dart index 3d11c6ddc2..736dc1f9ba 100644 --- a/lib/pages/chat/events/message_time.dart +++ b/lib/pages/chat/events/message_time.dart @@ -81,6 +81,7 @@ class MessageTime extends StatelessWidget { eventId: event.eventId, ), eventStatus: event.status, + event: event, ), ], ], diff --git a/lib/pages/chat/seen_by_row.dart b/lib/pages/chat/seen_by_row.dart index 8885c21703..bc2e972f7f 100644 --- a/lib/pages/chat/seen_by_row.dart +++ b/lib/pages/chat/seen_by_row.dart @@ -14,6 +14,7 @@ class SeenByRow extends StatelessWidget { final List participants; final EventStatus? eventStatus; final bool timelineOverlayMessage; + final Event event; const SeenByRow({ this.eventStatus, @@ -21,18 +22,27 @@ class SeenByRow extends StatelessWidget { required this.getSeenByUsers, required this.participants, required this.timelineOverlayMessage, + required this.event, }) : super(key: key); @override Widget build(BuildContext context) { - return getEventIcon(context, eventStatus, getSeenByUsers); + return getEventIcon( + context, + getSeenByUsers, + eventStatus: eventStatus, + ); } MessageStatus getMessageStatus( BuildContext context, + List seenByUsers, { EventStatus? eventStatus, - List seenByUsers, - ) { + }) { + Logs().d( + "SeenByRow::getMessageStatus: Content - ${event.content} - EventStatus $eventStatus - seenByUsers ${seenByUsers.length}", + ); + if (eventStatus == null || eventStatus == EventStatus.sending) { return MessageStatus.sending; } @@ -50,10 +60,15 @@ class SeenByRow extends StatelessWidget { Widget getEventIcon( BuildContext context, + List seenByUsers, { + bool? oldMessageFullyRead, EventStatus? eventStatus, - List seenByUsers, - ) { - final messageStatus = getMessageStatus(context, eventStatus, seenByUsers); + }) { + final messageStatus = getMessageStatus( + context, + seenByUsers, + eventStatus: eventStatus, + ); switch (messageStatus) { case MessageStatus.sending: return Icon( diff --git a/lib/utils/room_status_extension.dart b/lib/utils/room_status_extension.dart index 3652980453..cc4229d164 100644 --- a/lib/utils/room_status_extension.dart +++ b/lib/utils/room_status_extension.dart @@ -79,9 +79,7 @@ extension RoomStatusExtension on Room { } } lastReceipts.removeWhere( - (user) => - user.id == client.userID || - user.id == timeline.events.first.senderId, + (user) => user.id == client.userID, ); } return lastReceipts.toList();