Skip to content

Commit a2d4e07

Browse files
authored
Merge pull request #32 from edTheGuy00/patch-1
Update RxFirebaseDatabase.java
2 parents 6bf0a73 + 91323ea commit a2d4e07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/durdinapps/rxfirebase2/RxFirebaseDatabase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public void subscribe(final FlowableEmitter<DataSnapshot> emitter) throws Except
5656
public void onDataChange(DataSnapshot dataSnapshot) {
5757
if (dataSnapshot.exists()) {
5858
emitter.onNext(dataSnapshot);
59+
} else {
60+
emitter.onComplete();
5961
}
6062
}
6163

@@ -486,4 +488,4 @@ public static <T> Flowable<RxFirebaseChildEvent<T>> observeChildEvent(
486488
? extends RxFirebaseChildEvent<T>> mapper) {
487489
return observeChildEvent(query, BackpressureStrategy.DROP).map(mapper);
488490
}
489-
}
491+
}

0 commit comments

Comments
 (0)