feat: Collapse all state events by default

This commit is contained in:
Christian Kußowski 2025-06-21 11:15:28 +02:00
commit 103cb8328d
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
9 changed files with 121 additions and 79 deletions

View file

@ -44,6 +44,8 @@ class Message extends StatelessWidget {
final bool wallpaperMode;
final ScrollController scrollController;
final List<Color> colors;
final void Function()? onExpand;
final bool isCollapsed;
const Message(
this.event, {
@ -66,6 +68,8 @@ class Message extends StatelessWidget {
required this.onMention,
required this.scrollController,
required this.colors,
this.onExpand,
this.isCollapsed = false,
super.key,
});
@ -85,7 +89,7 @@ class Message extends StatelessWidget {
if (event.type == EventTypes.RoomCreate) {
return RoomCreationStateEvent(event: event);
}
return StateMessage(event);
return StateMessage(event, onExpand: onExpand, isCollapsed: isCollapsed);
}
if (event.type == EventTypes.Message &&