Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: use db's event manager instead of global

Abdullah Atta9c1a02dbd523
diff --git a/apps/mobile/app/hooks/use-app-events.tsx b/apps/mobile/app/hooks/use-app-events.tsx
index 83f20095b..95ab33f62 100644
--- a/apps/mobile/app/hooks/use-app-events.tsx
+++ b/apps/mobile/app/hooks/use-app-events.tsx
@@ -637,10 +637,10 @@ export const useAppEvents = () => {
EV.subscribe(EVENTS.syncCheckStatus, onCheckSyncStatus),
EV.subscribe(EVENTS.syncAborted, onSyncAborted),
EV.subscribe(EVENTS.appRefreshRequested, onSyncComplete),
- EV.subscribe(EVENTS.userLoggedOut, onLogout),
- EV.subscribe(EVENTS.userEmailConfirmed, onUserEmailVerified),
+ db.eventManager.subscribe(EVENTS.userLoggedOut, onLogout),
+ db.eventManager.subscribe(EVENTS.userEmailConfirmed, onUserEmailVerified),
EV.subscribe(EVENTS.userSessionExpired, onUserSessionExpired),
- EV.subscribe(
+ db.eventManager.subscribe(
EVENTS.userSubscriptionUpdated,
onUserSubscriptionStatusChanged
),