Skip to content

[PB-6742] bugfix/Login screen navigation - #574

Merged
CandelR merged 6 commits into
release/hide-photos-and-bump-versionfrom
bugfixes/PB-6742-photos-fixes-2
Aug 26, 2026
Merged

[PB-6742] bugfix/Login screen navigation#574
CandelR merged 6 commits into
release/hide-photos-and-bump-versionfrom
bugfixes/PB-6742-photos-fixes-2

Conversation

@CandelR

@CandelR CandelR commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Login no longer stays reachable after signing in. RootNavigator mounted a single Stack.Navigator with every screen at once; after login, WebLoginScreen only did a replace, so SignIn stayed underneath in the history and swipe-back / Android back returned to it while logged in.
  • Photos preview sometimes closed to the Home tab instead of Photos. Deleting an asset from the preview auto-closed it (navigation.goBack());, if the user also closed the preview manually, the second goBack() had nothing left to pop and landed on the bottom tab navigator, which defaults to backBehavior: 'firstRoute' (Home`).

Changes

  • src/navigation/AuthStackNavigator.tsx/src/navigation/AppStackNavigator.tsx: split the single root stack into a login stack and an app stack.
  • src/navigation/RootNavigator.tsx : now only picks which of the two stacks to mount, based on state.auth.loggedIn. Logging in unmounts the auth stack entirely (no history to go back to) and logging out unmounts the app stack.
  • src/screens/WebLoginScreen/index.tsx : removed the manual navigation.replace('TabExplorer', ...), the stack swap is now driven by signInThunk.
  • src/components/modals/SignOutModal/index.tsx / src/App.tsx: removed the manual navigationRef.reset(...) on sign-out. Now logging out unmounts the app stack automatically.
  • src/screens/PhotoPreviewScreen/index.tsx: centralized every way of closing the preview into a single closePreview() guarded by a ref, so only the first call actually pops the screen.

…reen after login, and fix photo preview closing back to login screen
@CandelR CandelR self-assigned this Aug 25, 2026
@CandelR CandelR added the bug Something isn't working label Aug 25, 2026
@CandelR
CandelR requested a review from xabg2 August 26, 2026 12:50
@CandelR
CandelR changed the base branch from bugfixes/PB-6742-photos-fixes to release/hide-photos-and-bump-version August 26, 2026 12:52
@sonarqubecloud

Copy link
Copy Markdown

@CandelR
CandelR merged commit 515621f into release/hide-photos-and-bump-version Aug 26, 2026
3 checks passed
@CandelR
CandelR deleted the bugfixes/PB-6742-photos-fixes-2 branch August 26, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants