ursus
11/04/2020, 11:49 PMStavFX
11/06/2020, 7:58 PMObservable.combineLatest(
source, Observable.timer(minProgressTimeMs, TimeUnit.MILLISECONDS)
) { data, _ -> data }
That way any "data" coming from source would wait until the first (and only) emission from timer before continuing downstream.
Also, this has the added benefit of only showing the network-data, in the case that source emits it faster than minProgressTimeMs. So you won't get a "flash" of cache-data, quickly followed by network-dataursus
11/09/2020, 5:56 PM