From 6ddd5078ac6012cd84fc38bb9163ffc0e3ebcda7 Mon Sep 17 00:00:00 2001 From: kashaf-ansari-dev Date: Fri, 22 May 2026 14:07:17 +0500 Subject: [PATCH] mobile: fix unset note expiry date Signed-off-by: kashaf-ansari-dev --- apps/mobile/app/hooks/use-actions.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/mobile/app/hooks/use-actions.tsx b/apps/mobile/app/hooks/use-actions.tsx index e0516ce57..e0fb8b95e 100644 --- a/apps/mobile/app/hooks/use-actions.tsx +++ b/apps/mobile/app/hooks/use-actions.tsx @@ -1180,11 +1180,13 @@ export const useActions = ({ }, { id: "expiry-date", - title: item.expiryDate ? strings.unsetExpiry() : strings.setExpiry(), - icon: item.expiryDate ? "bomb-off" : "bomb", + title: item.expiryDate?.value + ? strings.unsetExpiry() + : strings.setExpiry(), + icon: item.expiryDate.value ? "bomb-off" : "bomb", locked: !features?.expiringNotes?.isAllowed, onPress: async () => { - if (item.expiryDate) { + if (item.expiryDate?.value) { await db.notes.setExpiryDate(null, item.id); setItem((await db.notes.note(item.id)) as Item); } else {