- // this is unfortunate, but it appears we need a two-stage rocket to make
- // a value reach a recycler view item holder. first stage is a regular
- // LiveData that can be observed by an activity (this).
- // the second stage forwards the changes, in the UI thread, to the
- // observable value, observed by the view holders.
- // view holders can't observe the LiveData because they don't have
- // access to lifecycle owners. oh, also the value is updated by a thread
- // so it must be tunnelled by an activity for it to reach the view
- // holders in the UI thread
- Data.lastUpdateLiveData.observe(this, date -> runOnUiThread(
- () -> Data.lastUpdate.set((date == null) ? 0 : date.getTime())));