Status Update
Comments
yb...@google.com <yb...@google.com> #2
This actually has nothing to do with NavHostFragment, but is the behavior of NavController's setGraph().
When you call navController.setGraph(R.navigation.navigation_graph), it stores that ID and will restore that ID automatically.
If you were to instead use:
NavInflater navInflater = new NavInflater(this, navController.getNavigatorProvider());
navController.setGraph(navInflater.inflate(R.navigation.navigation_graph));
Then NavController would not restore the graph itself and the call to restoreState() you point out would only restore the back stack state, etc. but would wait for you to call setGraph again.
You're right that the inconsistency between the two setGraph methods is concerning. We'll take a look.
When you call navController.setGraph(R.navigation.navigation_graph), it stores that ID and will restore that ID automatically.
If you were to instead use:
NavInflater navInflater = new NavInflater(this, navController.getNavigatorProvider());
navController.setGraph(navInflater.inflate(R.navigation.navigation_graph));
Then NavController would not restore the graph itself and the call to restoreState() you point out would only restore the back stack state, etc. but would wait for you to call setGraph again.
You're right that the inconsistency between the two setGraph methods is concerning. We'll take a look.
za...@pinterest.com <za...@pinterest.com> #3
Turns out, we already had a tracking bug for this issue, will follow up on that other one.
Description
Version used: 1.0.0-alpha1
Devices/Android versions reproduced on: All
When using Room and RxRoom together if a query is made that uses limit it would be nice if after that limit is reached RxRoom would call onComplete on the stream.
For example, for a class User, we might write a query like this
"Select * from users limit 20"
Using the RxRoom library onComplete never gets called (well as far as I'm aware), as a workaround we usually also pass take(X) to the stream so we can move on once we hit 20 but it would be nice to have the library have a way to tell it we don't want to keep getting updates on that query once we hit our limit.