mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-07-10 12:37:16 +02:00
mobile: fix unset note expiry date
Signed-off-by: kashaf-ansari-dev <kashafansari3108@gmail.com>
This commit is contained in:
committed by
Ammar Ahmed
parent
579ae294b6
commit
6ddd5078ac
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user