mobile: show toast message on vault locked/unlocked events

This commit is contained in:
Ammar Ahmed
2026-06-24 12:13:38 +05:00
committed by Abdullah Atta
parent c69304781a
commit cbddea4518

View File

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