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,
|
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,16 +73,20 @@ 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: Tab(
|
child: Padding(
|
||||||
child: Row(
|
padding: kTabLabelPadding,
|
||||||
mainAxisSize: .min,
|
child: Tab(
|
||||||
spacing: 8,
|
child: Row(
|
||||||
children: [
|
mainAxisSize: .min,
|
||||||
ReactionKey(reaction, height: 20),
|
spacing: 8,
|
||||||
Text(reactions[reaction]!.senders.length.toString()),
|
children: [
|
||||||
],
|
ReactionKey(reaction, height: 20),
|
||||||
|
Text(reactions[reaction]!.senders.length.toString()),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue