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:
dab246
2025-06-16 11:47:42 +07:00
committed by Dat H. Pham
parent 2c29ab1801
commit 0a7ec53885
3 changed files with 10 additions and 6 deletions
@@ -200,12 +200,10 @@ abstract class BaseMailboxView extends GetWidget<MailboxController>
)
: null,
onSelectMailboxFolderClick: controller.selectMailboxNode,
onLongPressMailboxNodeAction: PlatformInfo.isMobile
? (mailboxNode) => controller.handleLongPressMailboxNodeAction(
context,
mailboxNode.item,
)
: null,
onLongPressMailboxNodeAction: (mailboxNode) => controller.handleLongPressMailboxNodeAction(
context,
mailboxNode.item,
),
onDragItemAccepted: PlatformInfo.isMobile
? null
: controller.handleDragItemAccepted,
@@ -124,6 +124,9 @@ class _MailboxItemWidgetState extends State<MailboxItemWidget> {
child: InkWell(
key: _key,
onTap: () => widget.onOpenMailboxFolderClick?.call(widget.mailboxNode),
onLongPress: !PlatformInfo.isCanvasKit
? () => widget.onLongPressMailboxNodeAction?.call(widget.mailboxNode)
: null,
onHover: (value) => setState(() => _isItemHovered = value),
borderRadius: const BorderRadius.all(
Radius.circular(MailboxItemWidgetStyles.borderRadius),
@@ -67,6 +67,9 @@ class _MailboxSearchedItemBuilderState extends State<MailboxSearchedItemBuilder>
if (PlatformInfo.isWeb) {
return InkWell(
onTap: _onTapMailboxAction,
onLongPress: !PlatformInfo.isCanvasKit
? _onLongPressMailboxAction
: null,
onHover: (value) => setState(() => isHoverItem = value),
child: Container(
decoration: BoxDecoration(