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

This commit is contained in:
ashilkn
2024-12-18 20:42:04 +05:30
parent a691745ef7
commit 09cc226511

View File

@@ -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)",
);
}),
);
}