A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
rename setCurrentUser to onUserUpdated
ammarahm-edd5b2aa2df17b
diff --git a/apps/mobile/src/utils/hooks/useAppEvents.js b/apps/mobile/src/utils/hooks/useAppEvents.jsindex aa84cfbb1..668f4cfa5 100644--- a/apps/mobile/src/utils/hooks/useAppEvents.js+++ b/apps/mobile/src/utils/hooks/useAppEvents.js@@ -109,10 +109,10 @@ export const useAppEvents = () => {EV.subscribe(EVENTS.mediaAttachmentDownloaded, onMediaDownloaded);EV.subscribe(EVENTS.attachmentsLoading, onLoadingAttachmentProgress);- eSubscribeEvent('userLoggedIn', setCurrentUser);+ eSubscribeEvent('userLoggedIn', onUserUpdated);return () => {- eUnSubscribeEvent('userLoggedIn', setCurrentUser);+ eUnSubscribeEvent('userLoggedIn', onUserUpdated);EV.unsubscribe(EVENTS.userSessionExpired, onSessionExpired);EV.unsubscribe(EVENTS.appRefreshRequested, onSyncComplete);EV.unsubscribe(EVENTS.databaseSyncRequested, onRequestPartialSync);@@ -145,7 +145,7 @@ export const useAppEvents = () => {if (url?.startsWith('https://app.notesnook.com/account/verified')) {await onEmailVerified();}- await setCurrentUser();+ await onUserUpdated();} catch (e) {}})();refValues.current.removeInternetStateListener =@@ -288,8 +288,8 @@ export const useAppEvents = () => {}};- const setCurrentUser = async login => {- console.log(`setCurrentUser: ${login}`);+ const onUserUpdated = async login => {+ console.log(`onUserUpdated: ${login}`);let user;try {user = await db.user.getUser();