open reaction image on long press anywhere in its tab
This commit is contained in:
parent
dccbda7870
commit
784db4f1dd
1 changed files with 13 additions and 8 deletions
|
|
@ -64,6 +64,7 @@ class const ReactionsPopover(
|
|||
controller: tabController,
|
||||
isScrollable: true,
|
||||
tabAlignment: .start,
|
||||
labelPadding: .zero,
|
||||
tabs: keys.map((reaction) {
|
||||
void expand() => context.showImageViewer(
|
||||
ref,
|
||||
|
|
@ -72,8 +73,11 @@ class const ReactionsPopover(
|
|||
final isImage = reaction.startsWith("mxc://");
|
||||
|
||||
return GestureDetector(
|
||||
behavior: .opaque,
|
||||
onSecondaryTap: isImage ? expand : null,
|
||||
onLongPress: isImage ? expand : null,
|
||||
child: Padding(
|
||||
padding: kTabLabelPadding,
|
||||
child: Tab(
|
||||
child: Row(
|
||||
mainAxisSize: .min,
|
||||
|
|
@ -84,6 +88,7 @@ class const ReactionsPopover(
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue