Status Update
Comments
il...@google.com <il...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
yu...@gmail.com <yu...@gmail.com> #3
il...@google.com <il...@google.com>
m....@futuremind.com <m....@futuremind.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
co...@protonmail.com <co...@protonmail.com> #5
Just adding that this still exists in alpha06.
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit ce0a07e52f9bbc60ff0983101da22d782ddff391
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Aug 10 17:42:26 2021
Ensure we keep track of all transitioning entries
We currently keep up with all transitioning entries in a set, which
means we can't keep up with multiple entries that are considered "equal"
but actually are different objects.
This currently breaks navigate with popUpTo and transitions since we
will pop first, causing us to consider the old entry as transitioning,
then when we navigate we attempt to add the new entry as transitioning,
but since it is "equal" to the old one, the set just ignores the add.
We need to instead make transitionsInProgress a List, meaning we can
have multiple entries that "equal" each other. This also means we need
to be sure to clear all the "equal" entries from the list whenever one
of them is complete.
Relnote: "Re-selecting the same tab when using navigation compose with
multiple back stacks will no longer result in a blank screen."
Test: added testSameEntry
Bug: 194925622
Change-Id: I860dc9f2cc2516924c03dba491a37aa8ace99bb3
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/NavigatorState.kt
M navigation/navigation-testing/src/androidTest/java/androidx/navigation/testing/TestNavigatorStateTest.kt
M navigation/navigation-testing/src/main/java/androidx/navigation/testing/TestNavigatorState.kt
jb...@google.com <jb...@google.com> #7
This has been fixed internally and will be available in the Navigation 2.4.0-alpha07
release.
You can try this out by following the #7634339
.
yu...@gmail.com <yu...@gmail.com> #8
I don't know if it's related to this, but now my flows collected in compose screens via collectAsState complete early when I reselect already selected home tab. Similarly, it doesn't happen when current screen is root graph's startDestination.
yu...@gmail.com <yu...@gmail.com> #9
So I debugged more using the sample I previously provided and it seems like it's related to this, although it only happens when using flowWithLifecycle as described here:
Attaching the sample that shows the problems and the video.
In sample view model, there is simple flow that emits text in some interval.
In 2.4.0-alpha04 - Collecting flow directly via collectAsState or via rememberFlowWithLifecycle works as expected (interval Flow doesn't complete until the user leaves the screen)
In 2.4.0-alpha05-06 - Screen becomes empty tab reselection
In Snapshot #7634339:
- Tab reselection doesn't cause empty screens.
- Tab reselection doesn't cause early flow completion when collecting interval flow directly via collectAsState
- Tab reselection does cause early flow completion when collecting interval flow wrapped rememberFlowWithLifecycle (as show in attached video)
ro...@gmail.com <ro...@gmail.com> #10
mi...@gmail.com <mi...@gmail.com> #11
so...@gmail.com <so...@gmail.com> #12
jb...@google.com <jb...@google.com> #13
Please file a new bug with a minimal sample project that reproduces this issue.
mi...@gmail.com <mi...@gmail.com> #14
de...@gmail.com <de...@gmail.com> #15
Additionally, I attached two videos. One using Navigation 2.6.0 shows it is working fine, while the other video using Navigation 2.7.1 shows the strange behavior of a blank flash.
I tested all 2.7.x versions and the 2.8.0 alpha, and it's still happening.
Additionally, in some cases, the transition of the screens is that it enters from the upper right corner to the lower left. This behavior is bizarre and erratic since there is no defined animation, and it happens randomly on the screen. Only when many buttons on the screens are pressed quickly.
Feel free to tag me if there is any advance :(. (I am new here, IDK how this works)
yu...@gmail.com <yu...@gmail.com> #16
ja...@gmail.com <ja...@gmail.com> #17
if (navController.previousBackStackEntry != null) {
navController.popBackStack()
}
ja...@gmail.com <ja...@gmail.com> #18
onClick = {
if (selectedItemIndex != index) {
localNavController.navigate(
route = item.route,
builder = {
launchSingleTop = true
restoreState = true
popUpTo(localNavController.graph.startDestinationId) {
saveState = true
}
}
)
}
}
Description
Component used: Navigation Compose
Version used: androidx.navigation:navigation-compose:2.4.0-alpha05
Devices/Android versions reproduced on: Android 12 beta
Problem: When re-selecting the same tab (i.e clicking already selected tab), the screen becomes empty. It doesn't happen when current destination is the root graph's startDestination.
I first noticed this on my app, then confirmed it by trying it on github.com/chrisbanes/tivi and upgrading nav compose to 2.4.0-alpha05.