Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix OCR gesture layer blocking motion photo long press on images without text

Amrithesh Kakkoth Ented19a69d21b95
diff --git a/mobile/apps/photos/lib/ui/viewer/file/inline_text_detection.dart b/mobile/apps/photos/lib/ui/viewer/file/inline_text_detection.dart
index 423d683d1b..29e646f906 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/inline_text_detection.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/inline_text_detection.dart
@@ -216,7 +216,11 @@ class _InlineTextDetectionState extends State<InlineTextDetection> {
// During the wait period (hasText passed but 1s timer hasn't fired),
// show a transparent gesture layer to capture long press.
- if (!_overlayActive || _localFilePath == null) {
+ // Only show when we know text exists to avoid blocking motion photo gestures.
+ if (_localFilePath == null) {
+ return const SizedBox.shrink();
+ }
+ if (!_overlayActive) {
return Positioned.fill(
child: GestureDetector(
behavior: HitTestBehavior.translucent,