fix(mobile): use correct delete action (#26575)

fix(mobile): use correct delete for trashed assets

When viewing a trashed asset, the viewer bottom bar now shows the permanent delete button instead of the trash button, which had no effect on already-trashed assets.
This commit is contained in:
Marius
2026-05-14 13:57:19 +02:00
committed by GitHub
parent 84a2b7a3c8
commit 37cc028868
6 changed files with 71 additions and 10 deletions
+3 -3
View File
@@ -123,9 +123,8 @@ enum ActionButtonType {
context.timelineOrigin == TimelineOrigin.trash,
ActionButtonType.deletePermanent =>
context.isOwner && //
context.asset.hasRemote && //
!context.isTrashEnabled ||
context.isInLockedView,
context.asset.hasRemote && //
(!context.isTrashEnabled || context.timelineOrigin == TimelineOrigin.trash || context.isInLockedView),
ActionButtonType.delete =>
context.isOwner && //
!context.isInLockedView && //
@@ -324,6 +323,7 @@ class ActionButtonBuilder {
ActionButtonType.archive,
ActionButtonType.unarchive,
ActionButtonType.restoreTrash,
ActionButtonType.deletePermanent,
};
static List<Widget> build(ActionButtonContext context) {