Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Component used: Lifecycle ViewModel SavedState with Navigation
When using returning a result , it can be useful to immediately remove the value after it is received, effectively removing the replay property of the backing
SavedStateHandle
, particularly for things such asLiveData
.This can be written manually by doing:
But it would be nice to wrap this up in a Kotlin extension that handles this pattern for developers, as originally suggested in b/149818635 .
This might allow developers to instead write: