Luis Munoz
07/02/2020, 12:12 AMFlow<T>.debounce and Flow<T>.sample
I read the documentation and don't really understand when i would use one or the other. I have the following code:
informService.informCount.debounce(250.milliseconds)
informCount is a StateFlow that gets updated super fast it doesn't seem to work (not emitting anything). Should I use sample instead of debounce or no?octylFractal
07/02/2020, 12:14 AMperiod
of time, debounce only emits after no events occur for period
of timesample
so that you get something even if it keeps updatingjulian
07/02/2020, 12:25 AMdebounce
emits the latest event after no events occur for a period of time.Luis Munoz
07/02/2020, 2:45 AM