truncate thread last message preview

This commit is contained in:
OfficialDakari 2025-11-27 12:49:07 +05:00
parent 955d2e3184
commit c5c43743ee
1 changed files with 10 additions and 2 deletions

View File

@ -716,7 +716,10 @@ class Message extends StatelessWidget {
size: 20, size: 20,
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
thread!.lastEvent != null thread!.lastEvent != null &&
thread!.lastEvent!
.relationshipEventId ==
event.eventId
? FutureBuilder<User?>( ? FutureBuilder<User?>(
future: thread!.lastEvent! future: thread!.lastEvent!
.fetchSenderUser(), .fetchSenderUser(),
@ -740,7 +743,12 @@ class Message extends StatelessWidget {
const SizedBox(width: 6), const SizedBox(width: 6),
thread!.lastEvent != null thread!.lastEvent != null
? Text( ? Text(
thread!.lastEvent!.text, thread!.lastEvent!.text
.length >
32
? "${thread!.lastEvent!.text.substring(0, 32)}..."
: thread!
.lastEvent!.text,
) )
: const Text('Thread'), : const Text('Thread'),
], ],