Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] add trash button to local gallery mode (#12247)

aspizu0c3f0d550657
diff --cc mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart
index fa878b5f77,7ec779745a..bc66d1afd6
--- a/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/trash_page.dart
@@@ -28,10 -29,16 +30,17 @@@ import "package:photos/ui/viewer/galler
import "package:photos/ui/viewer/gallery/state/gallery_boundaries_provider.dart";
import "package:photos/ui/viewer/gallery/state/gallery_files_inherited_widget.dart";
import "package:photos/ui/viewer/gallery/state/selection_state.dart";
+import "package:photos/utils/delete_file_util.dart";
import "package:photos/utils/device_info.dart";
- Future<void> showTrashPage(BuildContext context) async {
+ Future<void> showTrashPage(
+ BuildContext context, {
+ Function? beforeRouteToPage,
+ }) async {
+ final l10n = context.strings;
+ final hasAuthenticated = await LocalAuthenticationService.instance
+ .requestLocalAuthentication(context, l10n.authToViewTrashedFiles);
+ if (!hasAuthenticated) return;
final isDeviceTrashSupported =
flagService.internalUser &&
Platform.isAndroid &&