TF-1862: Fix show widget of Draggable when click right on email
(cherry picked from commit ff75ab1faa9d01f92b6740f057b17020c0c5b32b)
This commit is contained in:
@@ -358,7 +358,13 @@ class ThreadView extends GetWidget<ThreadController>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildEmailItemDraggable(BuildContext context, PresentationEmail presentationEmail) {
|
Widget _buildEmailItemDraggable(BuildContext context, PresentationEmail presentationEmail) {
|
||||||
return Draggable<List<PresentationEmail>>(
|
return GestureDetector(
|
||||||
|
behavior: HitTestBehavior.translucent,
|
||||||
|
onSecondaryTapDown: (details) {
|
||||||
|
// 1. Use empty callback to disable D&D on mouse right button
|
||||||
|
// 2. Call `showMenu` to show context menu
|
||||||
|
},
|
||||||
|
child: Draggable<List<PresentationEmail>>(
|
||||||
data: controller.listEmailDrag,
|
data: controller.listEmailDrag,
|
||||||
feedback: _buildFeedBackWidget(context),
|
feedback: _buildFeedBackWidget(context),
|
||||||
childWhenDragging: _buildEmailItemWhenDragging(context, presentationEmail),
|
childWhenDragging: _buildEmailItemWhenDragging(context, presentationEmail),
|
||||||
@@ -370,6 +376,7 @@ class ThreadView extends GetWidget<ThreadController>
|
|||||||
onDragEnd: (_) => controller.onDragMailBox(false),
|
onDragEnd: (_) => controller.onDragMailBox(false),
|
||||||
onDraggableCanceled: (_,__) => controller.onDragMailBox(false),
|
onDraggableCanceled: (_,__) => controller.onDragMailBox(false),
|
||||||
child: _buildEmailItemNotDraggable(context, presentationEmail)
|
child: _buildEmailItemNotDraggable(context, presentationEmail)
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user