mobile: fix missing delete button in trash

This commit is contained in:
Ammar Ahmed
2025-02-18 10:29:32 +05:00
committed by Ammar Ahmed
parent 97979e1631
commit 990df2a392
2 changed files with 14 additions and 14 deletions

View File

@@ -71,7 +71,8 @@ const COLUMN_BAR_ITEMS: ActionId[] = [
"rename-color",
"rename-tag",
"restore",
"trash"
"trash",
"delete"
];
export const Items = ({ item, close }: { item: Item; close: () => void }) => {

View File

@@ -977,19 +977,18 @@ export const useActions = ({
}
}
actions.push({
id: "trash",
title:
item.type !== "notebook" && item.type !== "note"
? strings.doActions.delete.unknown(
item.type === "trash" ? item.itemType : item.type,
1
)
: strings.moveToTrash(),
icon: "delete-outline",
type: "error",
onPress: deleteItem
});
if (item.type != "trash") {
actions.push({
id: "trash",
title:
item.type !== "notebook" && item.type !== "note"
? strings.doActions.delete.unknown(item.type, 1)
: strings.moveToTrash(),
icon: "delete-outline",
type: "error",
onPress: deleteItem
});
}
return actions;
};