So, I have to implement some chain or perhaps some custom RxJava operator to an Observable , that will distinct items emitted from Observable, until they change, but only for some short period (like 1 sec), then duplicated item can be emitted again.
(因此,我必须对Observable实现某个链或某个自定义RxJava运算符,该操作将区分从Observable发出的项目,直到它们改变为止,但仅在短时间内(例如1秒),然后可以再次发出重复的项目。)
What I need is some nested combination of distinctUntilChanged , with throttle ?
(我需要的是distinctUntilChanged的一些嵌套组合,与油门 ?)
Main requirements are:
(主要要求是:)
- different items have to be emitted without any delay
(必须立即发射不同的物品)
- the same item can not be emitted twice in given period
(在给定的时间内不能两次发射相同的物品)
I couldn't find any operator that matches my requirement so, probably I'll need to write some custom Rx operator, but still I can't figure out how to start
(我找不到符合我要求的任何运算符,因此,可能需要编写一些自定义Rx运算符,但仍然不知道如何开始)
ask by Patroy translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…