Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Move delete option in file selection actions to make it easily accessible (no scrolling needed)

ashilkn09cc2265117e
diff --git a/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart
index 16f23e3f73..801786f0ca 100644
--- a/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -248,6 +248,17 @@ class _FileSelectionActionsWidgetState
);
}
+ if (widget.type.showDeleteOption()) {
+ items.add(
+ SelectionActionButton(
+ icon: Icons.delete_outline,
+ labelText: S.of(context).delete,
+ onTap: anyOwnedFiles ? _onDeleteClick : null,
+ shouldShow: ownedAndPendingUploadFilesCount > 0,
+ ),
+ );
+ }
+
if (widget.type.showRemoveFromAlbum()) {
items.add(
SelectionActionButton(
@@ -306,17 +317,6 @@ class _FileSelectionActionsWidgetState
);
}
- if (widget.type.showDeleteOption()) {
- items.add(
- SelectionActionButton(
- icon: Icons.delete_outline,
- labelText: S.of(context).delete,
- onTap: anyOwnedFiles ? _onDeleteClick : null,
- shouldShow: ownedAndPendingUploadFilesCount > 0,
- ),
- );
- }
-
if (widget.type.showHideOption()) {
items.add(
SelectionActionButton(
@@ -840,7 +840,10 @@ class _FileSelectionActionsWidgetState
downloadQueue.add(() async {
await downloadToGallery(file);
downloadedFiles++;
- dialog.update(message: S.of(context).downloading + " ($downloadedFiles/$totalFiles)");
+ dialog.update(
+ message: S.of(context).downloading +
+ " ($downloadedFiles/$totalFiles)",
+ );
}),
);
}