mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 04:01:43 +02:00
mobile: fix missing delete button in trash
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user