-
Notifications
You must be signed in to change notification settings - Fork 8
Add a sample showing how to synchronously await for remote loads to be applied #987
Conversation
...n/java/com/android/example/paging/pagingwithnetwork/reddit/paging/SynchronousRemoteStates.kt
Outdated
Show resolved
Hide resolved
...n/java/com/android/example/paging/pagingwithnetwork/reddit/paging/SynchronousRemoteStates.kt
Outdated
Show resolved
Hide resolved
...n/java/com/android/example/paging/pagingwithnetwork/reddit/paging/SynchronousRemoteStates.kt
Outdated
Show resolved
Hide resolved
...n/java/com/android/example/paging/pagingwithnetwork/reddit/paging/SynchronousRemoteStates.kt
Outdated
Show resolved
Hide resolved
...n/java/com/android/example/paging/pagingwithnetwork/reddit/paging/SynchronousRemoteStates.kt
Outdated
Show resolved
Hide resolved
...n/java/com/android/example/paging/pagingwithnetwork/reddit/paging/SynchronousRemoteStates.kt
Outdated
Show resolved
Hide resolved
import kotlinx.coroutines.flow.scan | ||
import kotlin.Error | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you have tests from when you were experimenting with this in the paging codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do but it might take some time to adapt: https://android-review.googlesource.com/c/platform/frameworks/support/+/1591652/7/paging/common/src/main/kotlin/androidx/paging/MutableLoadStateCollection.kt
Let me leave this as a follow-up? I have a couple things on the queue I should probably do before migrating those tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
No description provided.