TF-3766 Show context menu when long press menu item on web mobile
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -200,12 +200,10 @@ abstract class BaseMailboxView extends GetWidget<MailboxController>
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
onSelectMailboxFolderClick: controller.selectMailboxNode,
|
onSelectMailboxFolderClick: controller.selectMailboxNode,
|
||||||
onLongPressMailboxNodeAction: PlatformInfo.isMobile
|
onLongPressMailboxNodeAction: (mailboxNode) => controller.handleLongPressMailboxNodeAction(
|
||||||
? (mailboxNode) => controller.handleLongPressMailboxNodeAction(
|
context,
|
||||||
context,
|
mailboxNode.item,
|
||||||
mailboxNode.item,
|
),
|
||||||
)
|
|
||||||
: null,
|
|
||||||
onDragItemAccepted: PlatformInfo.isMobile
|
onDragItemAccepted: PlatformInfo.isMobile
|
||||||
? null
|
? null
|
||||||
: controller.handleDragItemAccepted,
|
: controller.handleDragItemAccepted,
|
||||||
|
|||||||
@@ -124,6 +124,9 @@ class _MailboxItemWidgetState extends State<MailboxItemWidget> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: _key,
|
key: _key,
|
||||||
onTap: () => widget.onOpenMailboxFolderClick?.call(widget.mailboxNode),
|
onTap: () => widget.onOpenMailboxFolderClick?.call(widget.mailboxNode),
|
||||||
|
onLongPress: !PlatformInfo.isCanvasKit
|
||||||
|
? () => widget.onLongPressMailboxNodeAction?.call(widget.mailboxNode)
|
||||||
|
: null,
|
||||||
onHover: (value) => setState(() => _isItemHovered = value),
|
onHover: (value) => setState(() => _isItemHovered = value),
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(MailboxItemWidgetStyles.borderRadius),
|
Radius.circular(MailboxItemWidgetStyles.borderRadius),
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ class _MailboxSearchedItemBuilderState extends State<MailboxSearchedItemBuilder>
|
|||||||
if (PlatformInfo.isWeb) {
|
if (PlatformInfo.isWeb) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: _onTapMailboxAction,
|
onTap: _onTapMailboxAction,
|
||||||
|
onLongPress: !PlatformInfo.isCanvasKit
|
||||||
|
? _onLongPressMailboxAction
|
||||||
|
: null,
|
||||||
onHover: (value) => setState(() => isHoverItem = value),
|
onHover: (value) => setState(() => isHoverItem = value),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
Reference in New Issue
Block a user