chore: Follow up threads in chat list

This commit is contained in:
krille-chan 2025-11-07 17:16:24 +01:00
commit 71ba074e7d
No known key found for this signature in database

View file

@ -226,18 +226,53 @@ class ChatListItem extends StatelessWidget {
), ),
const SizedBox(width: 4), const SizedBox(width: 4),
], ],
AnimatedContainer( AnimatedSize(
width: typingText.isEmpty ? 0 : 18,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: const BoxDecoration(),
duration: FluffyThemes.animationDuration, duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve, curve: FluffyThemes.animationCurve,
padding: const EdgeInsets.only(right: 4), child: typingText.isNotEmpty
child: Icon( ? Padding(
Icons.edit_outlined, padding: const EdgeInsets.only(right: 4.0),
color: theme.colorScheme.secondary, child: Icon(
size: 14, Icons.edit_outlined,
), color: theme.colorScheme.secondary,
size: 16,
),
)
: room.lastEvent?.relationshipType ==
RelationshipTypes.thread
? Container(
decoration: BoxDecoration(
border: Border.all(
color: theme.colorScheme.outline,
),
borderRadius: BorderRadius.circular(
AppConfig.borderRadius,
),
),
padding:
const EdgeInsets.symmetric(horizontal: 8.0),
margin: const EdgeInsets.only(right: 4.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.message_outlined,
size: 12,
color: theme.colorScheme.outline,
),
const SizedBox(width: 4),
Text(
L10n.of(context).thread,
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
),
),
],
),
)
: const SizedBox.shrink(),
), ),
Expanded( Expanded(
child: room.isSpace && room.membership == Membership.join child: room.isSpace && room.membership == Membership.join