Unnecessary recomposition when navigating to the current screen from the TopBar

Open
#210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile-dev

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.

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
Dominant language
Kotlin
Stars
1.3k
Forks
400
Avg merge
9d 10h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from android/tv-samples

All issues in android/tv-samples

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.