mobile: add success messages on setting or removing expiry date

Signed-off-by: kashaf-ansari-dev <kashafansari3108@gmail.com>
This commit is contained in:
kashaf-ansari-dev
2026-06-05 14:22:27 +05:00
committed by Ammar Ahmed
parent 9e5ed67eb3
commit 20f39b82c6
4 changed files with 24 additions and 1 deletions

View File

@@ -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);
}}
/>

View File

@@ -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"

View File

@@ -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 ""

View File

@@ -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`
};