dimsuz
04/03/2017, 2:18 PMObservable<String>
which represents a stream of changes to some EditText
. It has a debounce(500, MILLIS)
operator applied. Observer for this observable saves a current value of the field to some variable whenever it is passed to onNext
.
also the form has a button which is always enabled and will validate the form by checking that variable with current edittext value.
The thing is: "Validate" button can be pressed while debounce operator is still debouncing, so it will validate not the final text (which would be saved to variable a few moments later). How can I synchronize these two: so that the button will somehow wait until debounce is finished. For that it would have to know that debounce is in progress...