Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Why is currentDestination momentarily returned as null ? #1675

Closed
3 tasks done
mahmed1987 opened this issue Oct 31, 2024 · 0 comments · Fixed by #1728
Closed
3 tasks done

[Bug]: Why is currentDestination momentarily returned as null ? #1675

mahmed1987 opened this issue Oct 31, 2024 · 0 comments · Fixed by #1728
Assignees
Labels
bug Something isn't working up for grabs Actively looking for someone to fix this issue

Comments

@mahmed1987
Copy link

mahmed1987 commented Oct 31, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

What happened?

When switching between the top level destinations , why is the current destination null first , and later gets its actual value ? This causes a flicker when moving from screen to screen since when the destination is null the top bar is taken out of the composition tree , and later bought back in

Just navigate to this location in NIA
com/google/samples/apps/nowinandroid/ui/NiaApp.kt:203
and add a Log statement under destination property
Log.d("Current Destination ","${destination}")

I have pasted the LogCat result too .

Also attached is a video in which the flicker can be clearly observed .

This is a huge issue and I am pretty sure this didn't exist when using navigation via string routes.

Please advise .

image

Now.in.Android.screen.recording.mp4
Oct 26 2024 002036 Gulf

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mahmed1987 mahmed1987 added the bug Something isn't working label Oct 31, 2024
@dturner dturner added the up for grabs Actively looking for someone to fix this issue label Dec 3, 2024
@dturner dturner assigned dturner and unassigned dturner Dec 3, 2024
@trambui09 trambui09 self-assigned this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working up for grabs Actively looking for someone to fix this issue
Projects
None yet
3 participants