takeWhile
Keeps the listener registered as long as the predicate returns true.
Parameters
predicate
A predicate that determines whether to keep the listener.
Keeps the listener registered as long as the predicate returns true.
A predicate that determines whether to keep the listener.