chore: Follow up select event handling
This commit is contained in:
parent
809ee213b6
commit
c313b03f71
2 changed files with 94 additions and 94 deletions
|
|
@ -98,8 +98,7 @@ class ChatEventList extends StatelessWidget {
|
||||||
child: event.isVisibleInGui
|
child: event.isVisibleInGui
|
||||||
? Message(
|
? Message(
|
||||||
event,
|
event,
|
||||||
onSwipe: (direction) =>
|
onSwipe: () => controller.replyAction(replyTo: event),
|
||||||
controller.replyAction(replyTo: event),
|
|
||||||
onInfoTab: controller.showEventInfo,
|
onInfoTab: controller.showEventInfo,
|
||||||
onAvatarTab: (Event event) => showAdaptiveBottomSheet(
|
onAvatarTab: (Event event) => showAdaptiveBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class Message extends StatelessWidget {
|
||||||
final void Function(Event)? onAvatarTab;
|
final void Function(Event)? onAvatarTab;
|
||||||
final void Function(Event)? onInfoTab;
|
final void Function(Event)? onInfoTab;
|
||||||
final void Function(String)? scrollToEventId;
|
final void Function(String)? scrollToEventId;
|
||||||
final void Function(SwipeDirection) onSwipe;
|
final void Function() onSwipe;
|
||||||
final bool longPressSelect;
|
final bool longPressSelect;
|
||||||
final bool selected;
|
final bool selected;
|
||||||
final Timeline timeline;
|
final Timeline timeline;
|
||||||
|
|
@ -116,7 +116,6 @@ class Message extends StatelessWidget {
|
||||||
|
|
||||||
final row = InkWell(
|
final row = InkWell(
|
||||||
onTap: longPressSelect ? () => onSelect!(event) : null,
|
onTap: longPressSelect ? () => onSelect!(event) : null,
|
||||||
onLongPress: () => onSelect!(event),
|
|
||||||
child: HoverBuilder(
|
child: HoverBuilder(
|
||||||
builder: (context, hovered) => Row(
|
builder: (context, hovered) => Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
@ -195,6 +194,7 @@ class Message extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
alignment: alignment,
|
alignment: alignment,
|
||||||
padding: const EdgeInsets.only(left: 8),
|
padding: const EdgeInsets.only(left: 8),
|
||||||
|
child: IgnorePointer(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: noBubble ? Colors.transparent : color,
|
color: noBubble ? Colors.transparent : color,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
|
|
@ -293,6 +293,7 @@ class Message extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -392,11 +393,11 @@ class Message extends StatelessWidget {
|
||||||
background: const Padding(
|
background: const Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Icon(Icons.reply_outlined),
|
child: Icon(Icons.check_outlined),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
direction: SwipeDirection.endToStart,
|
direction: SwipeDirection.endToStart,
|
||||||
onSwipe: onSwipe,
|
onSwipe: (_) => onSelect?.call(event),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: selected
|
color: selected
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue