observeWithNextSignal

fun observeWithNextSignal(eventHandler: (DittoCollectionsEvent, DittoSignalNext) -> Unit): DittoLiveQuery

Enables you to listen for changes that occur in relation to the collections that are known about. A block gets called when an update is received either locally or remotely. You can signal when you are ready for the next event to be delivered.

The returned DittoLiveQuery object must be kept in scope for as long as you want the provided eventHandler to be called when an update occurs.

Return

a DittoLiveQuery object that must be kept in scope for as long as you want to keep receiving updates.

Parameters

eventHandler

a closure that will be called every time there is an update about the list of known about collections.


Enables you to listen for changes that occur in relation to the collections that are known about. A block gets called when an update is received either locally or remotely. You can signal when you are ready for the next event to be delivered.

The returned DittoLiveQuery object must be kept in scope for as long as you want the provided eventHandler to be called when an update occurs.

Return

a DittoLiveQuery object that must be kept in scope for as long as you want to keep receiving updates.

Parameters

callback

an object that implements the DittoLiveQueryWithNextSignalCallback interface, whose update function will be called every time there is an update about the list of known about collections.