Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions app/sagas/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const appHasComeBackToForeground = function* appHasComeBackToForeground() {
if (appRoot !== RootEnum.ROOT_INSIDE) {
return;
}
// Check for pending notification BEFORE connection check.
// This ensures notification taps during WebSocket reconnection are not lost.
// checkPendingNotification() dispatches deepLinkingOpen, and the deepLinking
// saga already waits for LOGIN.SUCCESS before navigating to the room.
checkPendingNotification().catch((e) => {
log('[state.js] Error checking pending notification:', e);
});
const isReady = yield isAuthAndConnected();
if (!isReady) {
return;
Expand All @@ -27,10 +34,6 @@ const appHasComeBackToForeground = function* appHasComeBackToForeground() {
const server = yield select(state => state.server.server);
yield localAuthenticate(server);
checkAndReopen();
// Check for pending notification when app comes to foreground (Android - notification tap while in background)
checkPendingNotification().catch((e) => {
log('[state.js] Error checking pending notification:', e);
});
return yield setUserPresenceOnline();
} catch (e) {
log(e);
Expand Down