Skip to content

fix: LoginScreen does not appear immediately and you can see NotesScreen for a second - #821

Open
aguragorn wants to merge 1 commit into
PatilShreyas:masterfrom
aguragorn:fix-start-destination
Open

fix: LoginScreen does not appear immediately and you can see NotesScreen for a second#821
aguragorn wants to merge 1 commit into
PatilShreyas:masterfrom
aguragorn:fix-start-destination

Conversation

@aguragorn

Copy link
Copy Markdown

Summary

What:

  • When the user is logged out the app briefly shows the NotesScreen before redirecting to LoginScreen

Why:

  • The initial screen configured in navigation is NotesScreen

How:

  • Dynamically choose start destination based on login state
  • Add instrumentation tests to ensure correct start destination

Checklist

  • Build and linting is passing.
  • This change is not breaking existing flow of a system.
  • I have written test case for this change.
  • This change is tested from all aspects.

…een for a second

### What:
- When the user is logged out the app briefly shows the NotesScreen before redirecting to LoginScreen

### Why:
- The initial screen configured in navigation is NotesScreen

### How:
- Dynamically choose start destination based on login state
- Add instrumentation tests to ensure correct start destination
NotyTheme(darkTheme = LocalUiInDarkMode.current) {
Surface {
NotyNavigation()
NotyNavigation(state.isLoggedIn == true)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will still not solve a problem and could cause recompositions from navigation layer itself as isLoggedIn is by default null so value could be changed twice

  1. null -> false
  2. null -> true

So I think it'll still cause problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants