~/talk

Migrating from LiveData to Coroutines and Flow

Talkat Android Summit 2020 · 2020-10-08..10-09· [android]
github:jossiwolf
slides:none on file

Investigation finds UI jank caused by LiveData dispatches observers on main thread via Transformations.map and MediatorLiveData, so code refactors replace repository LiveData with suspend functions and retrofit coroutine support, add migration helpers that use liveData builder with a Dispatcher, move heavy mapping into ViewModel, convert streams to Flow and state to MutableStateFlow + StateFlow, and verify with unit tests using Turbine; migration removes main‑thread blocks and simplifies execution‑context control.

AI-written summary · about

  1. 0:00Intro
  2. 4:20The old code
  3. 18:42Converting to Flow
  4. 22:24State Flow
  5. 27:38Why State Flow
  6. 31:12Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.