Status Update
Comments
il...@google.com <il...@google.com>
wa...@reaktor.fi <wa...@reaktor.fi> #2
Hi. Thanks for reporting this. Fixed in alpha-04
th...@gmail.com <th...@gmail.com> #3
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
ap...@google.com <ap...@google.com> #4
jb...@google.com <jb...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
ro...@gmail.com <ro...@gmail.com> #6
I tried the new snapshot version, but it doesn't seem to be working for me.
Using a debugger, I verified that the new NavigatorState.onLaunchSingleTop()
was called, and the updatedBackStack
that was set with the expected argument update.
However, the NavHost
's composable
still doesn't get recomposed. Is it possible that arguments
are somehow being filtered out in state update changes?
jb...@google.com <jb...@google.com> #7
Please file a new bug with a minimal sample project that reproduces your issue.
ro...@gmail.com <ro...@gmail.com> #9
The issue in Empty
. But if you leave the app open and toggle the system dark mode, now the app will get recomposed with the new value2
.
If it helps, I can share the project, but it's really just the code from
th...@gmail.com <th...@gmail.com> #10
th...@gmail.com <th...@gmail.com> #11
Also, IMO, this is a core issue and should be marked as a high priority.
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit 5f1bdbbffc8c06355b22fdfe72ef1cf666b0d904
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Aug 18 03:45:03 2021
Ensure changing arguments causes recompose
Now that NavBackStackEntries are immutable and we don't just change
arguements, we change entire entries, we should make sure NavigatorState
properly handles launchSingleTop.
The only thing we need to do is to update both the navController and
navigator state back stacks with the proper entry.
RelNote: "Navigation Compose now properly recomposes when changing back
stack arguments and using launchSingleTop=true."
Test: all tests pass, and tested in samples from bug
Bug: 186392337
Fixes: 196390311
Change-Id: Iebd698c9e310ad84ce65238c8a5a33db86a9f1f7
M navigation/navigation-common/api/current.txt
M navigation/navigation-common/api/public_plus_experimental_current.txt
M navigation/navigation-common/api/restricted_current.txt
M navigation/navigation-common/src/main/java/androidx/navigation/Navigator.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavigatorState.kt
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
jb...@google.com <jb...@google.com> #14
We were able to get a fix for this in Navigation 2.4.0-alpha08
.
You can try this out by following the #7677699
.
ma...@gmail.com <ma...@gmail.com> #15
jb...@google.com <jb...@google.com> #16
Please file a new bug with a minimal sample project that reproduces the issue.
so...@gmail.com <so...@gmail.com> #17
The same issue still exists.
il...@google.com <il...@google.com> #18
Re
Description
Component used: Navigation-Compose Version used: 1.0.0-alpha10, Compose 1.0.0-beta05
A bit short on time, so just posting a simple repro here. When trying to navigate to a destination that is the current destination but with different arguments using
NavOptions.launchSingleTop
, the NavController will replace the current NavBackStackEntry's arguments. Consider the following example:In
NavController#currentBackStackEntryAsState
, theState
's value won't be changed because the reference stays the same and the NavBackStackEntry held by the state has already been mutated, so theNavHost
won't recompose after that change. Maybe theNeverEqualPolicy
could be used as a quick fix.Let me know if you need more info, cheers!