hey, I would need help with custom flow transforma...
# flow
p
hey, I would need help with custom flow transformation. I would basically need something like
distinctUntilChanged()
, with the exception, to re-emit same value, after certain amount of time has passed. How would I achieve that?
Copy code
time [sec], input values, emitted value
0, "A", "A"
1, "A", <no emission>
2, "A", <no emission>
3, "A", "A"
4, "B", "B"
e
p
thank you for code!
feels like using launch is not the most optimal solution?
e
the only public way to access kotlinx.coroutine.Delay (so that timing can be faked during tests) is with delay or withTimeout
p
hm, I see