chore: Follow up seen by row

This commit is contained in:
Christian Kußowski 2026-02-15 12:08:17 +01:00
parent 78aeceeb93
commit 127bc6d698
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 18 additions and 12 deletions

View file

@ -8,6 +8,7 @@ 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';
@ -76,7 +77,13 @@ class ChatEventList extends StatelessWidget {
),
);
}
return TypingIndicators(controller);
return Column(
mainAxisSize: .min,
children: [
SeenByRow(event: events.first),
TypingIndicators(controller),
],
);
}
// Request history button or progress indicator:

View file

@ -10,7 +10,6 @@ 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';
@ -858,7 +857,6 @@ class Message extends StatelessWidget {
child: MessageReactions(event, timeline),
),
),
SeenByRow(timeline: timeline, event: event),
if (enterThread != null)
AnimatedSize(
duration: FluffyThemes.animationDuration,

View file

@ -7,9 +7,8 @@ import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/matrix.dart';
class SeenByRow extends StatelessWidget {
final Timeline timeline;
final Event event;
const SeenByRow({super.key, required this.timeline, required this.event});
const SeenByRow({super.key, required this.event});
@override
Widget build(BuildContext context) {
@ -17,9 +16,9 @@ class SeenByRow extends StatelessWidget {
const maxAvatars = 7;
return StreamBuilder(
stream: timeline.room.client.onSync.stream.where(
stream: event.room.client.onSync.stream.where(
(syncUpdate) =>
syncUpdate.rooms?.join?[timeline.room.id]?.ephemeral?.any(
syncUpdate.rooms?.join?[event.room.id]?.ephemeral?.any(
(ephemeral) => ephemeral.type == 'm.receipt',
) ??
false,
@ -38,13 +37,15 @@ class SeenByRow extends StatelessWidget {
? Duration.zero
: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve,
alignment:
timeline.events.isNotEmpty &&
timeline.events.first.senderId ==
Matrix.of(context).client.userID
alignment: event.senderId == Matrix.of(context).client.userID
? Alignment.topRight
: Alignment.topLeft,
padding: const EdgeInsets.only(bottom: 4, top: 1),
padding: const EdgeInsets.only(
bottom: 4,
top: 1,
left: 8,
right: 8,
),
child: Wrap(
spacing: 4,
children: [