Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
pr...@google.com <pr...@google.com> #4
Thanks for the detailed analysis. This may not be an issue anymore since we've started using Main.immediate there but I' not sure; I'll try to create a test case.
Description
Component used: Navigation
Problem:
Given a navigation graph, when I programatically route to destinations, one option to do so is to use the Actions api:
Everyone makes mistakes, and sometimes the
navigate
call is omitted. This can lead to hard to spot bugs.Solution:
There are two possible solutions here. One is to simply apply
@CheckResult
to the action method in the generated code output. This is the simplest, and most straightforward. It is also probably the right move, given that if you create an action via this API, it's a bit weird if you then never use it.We can take this a step further, and add a custom lint rule that checks that the action is actually utilized, the same way in which we check that, for example, we commit fragment transactions.