refactor(database): migrate to paging 3#1983
refactor(database): migrate to paging 3#1983samtstern merged 6 commits intofirebase:version-8.0.0-devfrom
Conversation
…aseUI-Android into rpf-rtdb-paging-3 � Conflicts: � database/src/main/java/com/firebase/ui/database/paging/FirebaseRecyclerPagingAdapter.java
samtstern
left a comment
There was a problem hiding this comment.
Approve, just one comment you may want to address before I merge. Thank you for this!
| } | ||
|
|
||
| return Single.fromCallable(() -> { | ||
| Tasks.await(task); |
There was a problem hiding this comment.
I think this will throw if the Tasks fails:
https://developers.google.com/android/reference/com/google/android/gms/tasks/Tasks#await(com.google.android.gms.tasks.Task%3CTResult%3E)
So we can't rely on getting to the next line. Although I think it's fine since you re-throw at the bottom, but I just don't think you'll ever get that far.
Also we can probably remove the task.isSuccessful nesting since we know if we even get to the next line, the task is successful.
There was a problem hiding this comment.
@samtstern Interesting, I didn't know that.
I have wrapped it around a try/catch so that developers using FirebaseUI can get the original cause instead of await's ExecutionException.
This PR should:
See #1982