ubu
05/24/2018, 9:47 PMObservable.create { emitter ->
val listener = db.addListener(
...
emitter.onNext(data)
// there's no onComplete() event here.
)
}
I need to call db.removeListener()
when this observable is unsubscribed. How would you do that? Thanks.
Full disclosure: it’s about wrapping Firebase Realtime Database callbacks.