From cbddea45182593fdd37f8d25b8ad96943ca96cec Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Wed, 24 Jun 2026 12:13:38 +0500 Subject: [PATCH] mobile: show toast message on vault locked/unlocked events --- apps/mobile/app/hooks/use-app-events.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/mobile/app/hooks/use-app-events.tsx b/apps/mobile/app/hooks/use-app-events.tsx index c2dc0f03f..79abc6a63 100644 --- a/apps/mobile/app/hooks/use-app-events.tsx +++ b/apps/mobile/app/hooks/use-app-events.tsx @@ -766,6 +766,26 @@ export const useAppEvents = () => { db.eventManager.subscribe(EVENTS.uploadCanceled, (data) => { useAttachmentStore.getState().setUploading(data); }), + db.eventManager.subscribeMulti( + [EVENTS.vaultAutoLocked, EVENTS.vaultLocked], + () => { + setTimeout(() => { + ToastManager.show({ + message: strings.vaultLocked(), + type: "info" + }); + }, 300); + }, + undefined + ), + db.eventManager.subscribe(EVENTS.vaultUnlocked, () => { + setTimeout(() => { + ToastManager.show({ + message: strings.vaultUnlocked(), + type: "info" + }); + }, 300); + }), EV.subscribe(EVENTS.migrationStarted, (name) => { if ( name !== "notesnook" ||