mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-07-09 20:09:36 +02:00
mobile: add success messages on setting or removing expiry date
Signed-off-by: kashaf-ansari-dev <kashafansari3108@gmail.com>
This commit is contained in:
committed by
Ammar Ahmed
parent
9e5ed67eb3
commit
20f39b82c6
@@ -1188,6 +1188,13 @@ export const useActions = ({
|
||||
onPress: async () => {
|
||||
if (item.expiryDate?.value) {
|
||||
await db.notes.setExpiryDate(null, item.id);
|
||||
|
||||
ToastManager.show({
|
||||
message: strings.expiryDateRemoved(),
|
||||
type: "success",
|
||||
context: "local"
|
||||
});
|
||||
|
||||
setItem((await db.notes.note(item.id)) as Item);
|
||||
} else {
|
||||
if (features && !features?.expiringNotes.isAllowed) {
|
||||
@@ -1211,6 +1218,13 @@ export const useActions = ({
|
||||
onConfirm={async (date) => {
|
||||
close?.();
|
||||
await db.notes.setExpiryDate(date.getTime(), item.id);
|
||||
|
||||
ToastManager.show({
|
||||
message: strings.expiryDateSet(),
|
||||
type: "success",
|
||||
context: "local"
|
||||
});
|
||||
|
||||
setItem((await db.notes.note(item.id)) as Item);
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -2783,6 +2783,10 @@ msgstr "Expiry date cannot be more than 1 year in the future"
|
||||
msgid "Expiry date must be in the future"
|
||||
msgstr "Expiry date must be in the future"
|
||||
|
||||
#: src/strings.ts:2706
|
||||
msgid "Expiry date removed"
|
||||
msgstr "Expiry date removed"
|
||||
|
||||
#: src/strings.ts:2693
|
||||
msgid "Expiry date set"
|
||||
msgstr "Expiry date set"
|
||||
|
||||
@@ -2772,6 +2772,10 @@ msgstr ""
|
||||
msgid "Expiry date must be in the future"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2706
|
||||
msgid "Expiry date removed"
|
||||
msgstr ""
|
||||
|
||||
#: src/strings.ts:2693
|
||||
msgid "Expiry date set"
|
||||
msgstr ""
|
||||
|
||||
@@ -2702,5 +2702,6 @@ Continue without attachments?`,
|
||||
t`We couldn't load this theme. The file appears to be incomplete or missing required theme properties.`,
|
||||
copyLogs: () => t`Copy logs`,
|
||||
permissionRequiredToSaveQRCode: () =>
|
||||
t`Permission required to save QR-Code to Gallery`
|
||||
t`Permission required to save QR-Code to Gallery`,
|
||||
expiryDateRemoved: () => t`Expiry date removed`
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user