Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Skip QR-region guard when overlay is not visible

Amrithesh Kakkoth Ente5c95850f3599
diff --git a/mobile/apps/photos/lib/ui/viewer/file/zoomable_live_image_new.dart b/mobile/apps/photos/lib/ui/viewer/file/zoomable_live_image_new.dart
index c7c4abeb0d..4ef876c5b4 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/zoomable_live_image_new.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/zoomable_live_image_new.dart
@@ -15,6 +15,7 @@ import 'package:photos/models/file/file.dart';
import "package:photos/models/metadata/file_magic.dart";
import "package:photos/services/file_magic_service.dart";
import "package:photos/src/rust/api/motion_photo_api.dart";
+import "package:photos/states/detail_page_state.dart";
import 'package:photos/ui/notification/toast.dart';
import 'package:photos/ui/viewer/file/zoomable_image.dart';
import 'package:photos/utils/file_util.dart';
@@ -115,8 +116,14 @@ class _ZoomableLiveImageNewState extends State<ZoomableLiveImageNew>
}
void _onLongPressEvent(bool isPressed, [Offset? localPosition]) {
- // If pressing within a QR code region, let the QR overlay handle it
+ // If pressing within a QR code region, let the QR overlay handle it,
+ // but only when the overlay is actually visible (not in fullscreen mode).
+ final isQrOverlayVisible = !(InheritedDetailPageState.maybeOf(context)
+ ?.enableFullScreenNotifier
+ .value ??
+ true);
if (isPressed &&
+ isQrOverlayVisible &&
localPosition != null &&
_isPositionInQrRegion(localPosition)) {
return;