From a289eae07c6c99480f0d758660150fc35e1523fb Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Tue, 29 Oct 2024 19:57:29 +0800 Subject: [PATCH] fix: mobile -> mobile, long press (#9775) Signed-off-by: fufesou --- flutter/lib/common/widgets/remote_input.dart | 4 +++- flutter/lib/models/model.dart | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/flutter/lib/common/widgets/remote_input.dart b/flutter/lib/common/widgets/remote_input.dart index a4d3caf29..4a82dfae3 100644 --- a/flutter/lib/common/widgets/remote_input.dart +++ b/flutter/lib/common/widgets/remote_input.dart @@ -185,7 +185,9 @@ class _RawTouchGestureDetectorRegionState ffi.cursorModel .move(_cacheLongPressPosition.dx, _cacheLongPressPosition.dy); } - inputModel.tap(MouseButtons.right); + if (!ffi.ffiModel.isPeerMobile) { + inputModel.tap(MouseButtons.right); + } } onDoubleFinerTapDown(TapDownDetails d) { diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index ecbfd6fa4..bd844c3ca 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -142,6 +142,7 @@ class FfiModel with ChangeNotifier { bool get touchMode => _touchMode; bool get isPeerAndroid => _pi.platform == kPeerPlatformAndroid; + bool get isPeerMobile => isPeerAndroid; bool get viewOnly => _viewOnly;