open reaction image on long press anywhere in its tab

This commit is contained in:
Henry Hiles 2026-12-01 02:02:14 -05:00
commit 784db4f1dd
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -64,6 +64,7 @@ class const ReactionsPopover(
controller: tabController, controller: tabController,
isScrollable: true, isScrollable: true,
tabAlignment: .start, tabAlignment: .start,
labelPadding: .zero,
tabs: keys.map((reaction) { tabs: keys.map((reaction) {
void expand() => context.showImageViewer( void expand() => context.showImageViewer(
ref, ref,
@ -72,8 +73,11 @@ class const ReactionsPopover(
final isImage = reaction.startsWith("mxc://"); final isImage = reaction.startsWith("mxc://");
return GestureDetector( return GestureDetector(
behavior: .opaque,
onSecondaryTap: isImage ? expand : null, onSecondaryTap: isImage ? expand : null,
onLongPress: isImage ? expand : null, onLongPress: isImage ? expand : null,
child: Padding(
padding: kTabLabelPadding,
child: Tab( child: Tab(
child: Row( child: Row(
mainAxisSize: .min, mainAxisSize: .min,
@ -84,6 +88,7 @@ class const ReactionsPopover(
], ],
), ),
), ),
),
); );
}).toList(), }).toList(),
), ),