Closed lukaIvanic closed 3 years ago
We use getLiveData
which automatically saves the value to SavedStateHandle
whenever it changes.
Hmm weird, I only noticed the issue because I wouldn't get the query back on process death, but maybe I missed something. Either way it's fixed, thank you for the answer, and especially thanks for the awesome tuts!
No real issue here, it's just that we never actually save query data into state (SavedStateHandle). All I did was add:
init { searchQuery.map { state.set("searchQuery", it) } }
Or maybe I'm just dumb and missed something