diff --git a/apps/mobile/app/components/note-history/preview.tsx b/apps/mobile/app/components/note-history/preview.tsx
index 9124312bc..e4cb3abb1 100644
--- a/apps/mobile/app/components/note-history/preview.tsx
+++ b/apps/mobile/app/components/note-history/preview.tsx
@@ -112,19 +112,23 @@ export default function NotePreview({
paragraph: strings.deleteNoteConfirmation(),
positiveText: strings.delete(),
negativeText: strings.cancel(),
- context: "local",
+ context: "preview",
positivePress: async () => {
- if (note) {
+ if (session) {
+ await db.noteHistory.remove(session.id);
+ eSendEvent(eCloseSheet, "note_history");
+ Navigation.queueRoutesForUpdate();
+ } else if (note.type === "trash") {
await db.trash.delete(note.id);
useTrashStore.getState().refresh();
useSelectionStore.getState().setSelectionMode();
- ToastManager.show({
- heading: strings.noteDeleted(),
- type: "success",
- context: "local"
- });
- eSendEvent(eCloseSheet);
}
+ ToastManager.show({
+ heading: strings.noteDeleted(),
+ type: "success"
+ });
+
+ eSendEvent(eCloseSheet);
},
positiveType: "error"
});
@@ -137,7 +141,7 @@ export default function NotePreview({
width: "100%"
}}
>
-
+