design: Hide unimportant state events instead of folding

This commit is contained in:
Christian Pauly 2022-10-15 10:38:06 +02:00
commit b642f89738
13 changed files with 125 additions and 161 deletions

View file

@ -12,11 +12,7 @@ class SeenByRow extends StatelessWidget {
@override
Widget build(BuildContext context) {
final seenByUsers = controller.room!.getSeenByUsers(
controller.timeline!,
controller.filteredEvents,
controller.unfolded,
);
final seenByUsers = controller.room!.getSeenByUsers(controller.timeline!);
const maxAvatars = 7;
return Container(
width: double.infinity,
@ -28,8 +24,8 @@ class SeenByRow extends StatelessWidget {
duration: seenByUsers.isEmpty
? const Duration(milliseconds: 0)
: const Duration(milliseconds: 300),
alignment: controller.filteredEvents.isNotEmpty &&
controller.filteredEvents.first.senderId ==
alignment: controller.timeline!.events.isNotEmpty &&
controller.timeline!.events.first.senderId ==
Matrix.of(context).client.userID
? Alignment.topRight
: Alignment.topLeft,