1
0
Fork 0
forked from Nexus/nexus

Make reactions flexible to fix overflow issues

This commit is contained in:
Henry Hiles 2026-04-13 09:39:59 -04:00
commit b93f4c979c
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -31,8 +31,7 @@ class ReactionRow extends ConsumerWidget {
builder: (context) { builder: (context) {
final enabled = useState(true); final enabled = useState(true);
final selected = reactors.contains(clientState!.userId); final selected = reactors.contains(clientState!.userId);
return SizedBox( return Tooltip(
child: Tooltip(
message: reactors.join(", "), message: reactors.join(", "),
child: ChoiceChip( child: ChoiceChip(
showCheckmark: false, showCheckmark: false,
@ -41,7 +40,8 @@ class ReactionRow extends ConsumerWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
spacing: 8, spacing: 8,
children: [ children: [
reaction.startsWith("mxc://") Flexible(
child: reaction.startsWith("mxc://")
? Image( ? Image(
height: 20, height: 20,
image: CachedNetworkImage( image: CachedNetworkImage(
@ -56,8 +56,15 @@ class ReactionRow extends ConsumerWidget {
), ),
), ),
) )
: Text(reaction), : Text(
Text(reactors.length.toString()), reaction,
overflow: TextOverflow.ellipsis,
),
),
Text(
reactors.length.toString(),
overflow: TextOverflow.ellipsis,
),
], ],
), ),
onSelected: enabled.value onSelected: enabled.value
@ -99,7 +106,6 @@ class ReactionRow extends ConsumerWidget {
} }
: null, : null,
), ),
),
); );
}, },
), ),