Skip to content

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

disable connecting sse on if session expired

ammarahm-ed0b1ccd747f3b
diff --git a/apps/mobile/src/utils/useAppEvents.js b/apps/mobile/src/utils/useAppEvents.js
index 11301635b..ce7afdca7 100644
--- a/apps/mobile/src/utils/useAppEvents.js
+++ b/apps/mobile/src/utils/useAppEvents.js
@@ -501,6 +501,10 @@ export const useAppEvents = () => {
if (!refValues.current?.isUserReady) {
return;
}
+ if ((await MMKV.getItem('loginSessionHasExpired')) === 'expired') {
+ refValues.current.isReconnecting = false;
+ return;
+ }
refValues.current.isReconnecting = true;
let state = connection;
try {