Skip to content

armgit / ente

Public Imported from GitHub
0

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

Merge remote-tracking branch 'ente-io/main' into ios-text-selection

Neerajbb34059a5ae7
diff --cc mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
index 65f09dfd64,0107bc602a..6753032ca8
--- a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
@@@ -270,18 -281,6 +283,18 @@@ class FileAppBarState extends State<Fil
),
);
+ // Text detection for internal iOS users (images and live photos, but not videos)
+ if (flagService.textDetection && widget.file.fileType != FileType.video) {
+ items.add(
+ EntePopupMenuItem(
+ "Detect Text (i)",
- value: 10,
++ value: 11,
+ icon: Icons.text_fields,
+ iconColor: Theme.of(context).iconTheme.color,
+ ),
+ );
+ }
+
if (widget.file.isVideo) {
// Video streaming options
if (_shouldShowCreateStreamOption()) {
@@@ -375,7 -374,7 +388,9 @@@
} else if (value == 9) {
await _handleVideoStream('recreate');
} else if (value == 10) {
+ await _handleAddToAlbum();
++ } else if (value == 11) {
+ await _handleTextDetection();
}
},
),
@@@ -546,24 -545,13 +561,31 @@@
}
}
+ Future<void> _handleTextDetection() async {
-
-
+ try {
+ final File? localFile = await getFile(widget.file);
+ if (localFile == null) {
+ throw Exception("Failed to get file for text detection");
+ }
+ if (mounted) {
+ await routeToPage(
+ context,
+ TextDetectionPage(imagePath: localFile.path),
+ );
+ }
+ } catch (e) {
-
+ _logger.severe("Failed to start text detection", e);
+ await showGenericErrorDialog(context: context, error: e);
+ }
+ }
++
+ Future<void> _handleAddToAlbum() async {
+ final selectedFiles = SelectedFiles();
+ selectedFiles.files.add(widget.file);
+ showCollectionActionSheet(
+ context,
+ selectedFiles: selectedFiles,
+ actionType: CollectionActionType.addFiles,
+ );
+ }
}
diff --cc mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart
index f1b5be3b32,439f455920..fc85347b30
--- a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart
+++ b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart
@@@ -66,7 -66,9 +66,11 @@@ class FlagService
bool get albumGuestView => internalUser;
+ bool get textDetection => internalUser && Platform.isIOS;
++
+ bool get addToAlbumFeature => internalUser;
+
+ bool get widgetSharedAlbums => internalUser;
bool hasSyncedAccountFlags() {
return _prefs.containsKey("remote_flags");
diff --cc mobile/apps/photos/scripts/internal_changes.txt
index 00426ae042,7744d8370d..fecf5c072e
--- a/mobile/apps/photos/scripts/internal_changes.txt
+++ b/mobile/apps/photos/scripts/internal_changes.txt
@@@ -1,4 -1,9 +1,10 @@@
+- Neeraj: (i) Add text detection option for images (iOS internal users)
+ - Prateek: Fix logout failure for custom endpoints when server is unreachable
+ - Prateek: Ensure comprehensive cache clearing on logout
+ - Neeraj: Simplify location display in file info - show "Location" title with "Add location" chip
+ - Laurens: Fix edge case bug in similar images cache when user hasn't indexed ML yet
+ - Neeraj: (i) Show shared albums in widget selection screen
+ - Neeraj: (i) Add to album option in file overflow menu and file details [#3291](https://github.com/ente-io/ente/discussions/3291)
- Neeraj: (i) Add collection-level guest view option in album overflow menu
- Neeraj: Fix IDN domain display in public URLs [#7079](https://github.com/ente-io/ente/issues/7079)
- Neeraj: (i) Add allow joining album option in manage links