Unnecessary recomposition when navigating to the current screen from the TopBar
- Dominant language
- Kotlin
- Stars
- 1.3k
- Forks
- 396
- PR merge metrics
- No merged PRs in 30d
Description
### Issue Description
When a user focuses or clicks on a TopBar tab that corresponds to the screen they are already on, the app still triggers a navigation action.
This causes an unnecessary recomposition of the current screen, even though the user is not navigating to a new destination.
### Expected Behavior
Navigation should only occur when the destination screen is different from the current one.
If the user re-selects the same tab, the app should remain on the current screen without triggering a recomposition.
### Impact
- Unnecessary recompositions
- Performance overhead
- Potential negative impact on user experience
Contributor guide
Research direction
Locate the TopBar tab handling and the navigation entry point, then read how the current destination is determined. Verify that selecting the already-visible screen does not issue a navigation action or trigger recomposition, while selecting a different tab still navigates normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100