feat: Display read receipts for every event

This commit is contained in:
Christian Kußowski 2026-02-15 11:54:47 +01:00
parent 193d68a525
commit 6cb7775c93
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 8 additions and 16 deletions

View file

@ -8,7 +8,6 @@ import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/l10n/l10n.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/events/message.dart';
import 'package:fluffychat/pages/chat/seen_by_row.dart';
import 'package:fluffychat/pages/chat/typing_indicators.dart';
import 'package:fluffychat/utils/account_config.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/filtered_timeline_extension.dart';
@ -77,13 +76,7 @@ class ChatEventList extends StatelessWidget {
),
);
}
return Column(
mainAxisSize: .min,
children: [
SeenByRow(timeline: timeline, event: events.first),
TypingIndicators(controller),
],
);
return TypingIndicators(controller);
}
// Request history button or progress indicator:

View file

@ -10,6 +10,7 @@ import 'package:swipe_to_action/swipe_to_action.dart';
import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/l10n/l10n.dart';
import 'package:fluffychat/pages/chat/seen_by_row.dart';
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
import 'package:fluffychat/utils/date_time_extension.dart';
import 'package:fluffychat/utils/file_description.dart';
@ -196,7 +197,7 @@ class Message extends StatelessWidget {
);
}
final showReceiptsRow = event.hasAggregatedEvents(
final hasReactions = event.hasAggregatedEvents(
timeline,
RelationshipTypes.reaction,
);
@ -841,11 +842,12 @@ class Message extends StatelessWidget {
);
},
),
AnimatedSize(
duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
alignment: Alignment.bottomCenter,
child: !showReceiptsRow
child: !hasReactions
? const SizedBox.shrink()
: Padding(
padding: EdgeInsets.only(
@ -856,6 +858,7 @@ class Message extends StatelessWidget {
child: MessageReactions(event, timeline),
),
),
SeenByRow(timeline: timeline, event: event),
if (enterThread != null)
AnimatedSize(
duration: FluffyThemes.animationDuration,

View file

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/utils/room_status_extension.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/matrix.dart';
@ -26,10 +25,7 @@ class SeenByRow extends StatelessWidget {
false,
),
builder: (context, asyncSnapshot) {
final seenByUsers = timeline.room.getSeenByUsers(
timeline,
eventId: event.eventId,
);
final seenByUsers = event.receipts.map((r) => r.user).toList();
return Container(
width: double.infinity,
alignment: Alignment.center,
@ -48,7 +44,7 @@ class SeenByRow extends StatelessWidget {
Matrix.of(context).client.userID
? Alignment.topRight
: Alignment.topLeft,
padding: const EdgeInsets.only(left: 8, right: 8, bottom: 4),
padding: const EdgeInsets.only(bottom: 4, top: 1),
child: Wrap(
spacing: 4,
children: [