Status Update
Comments
cc...@google.com <cc...@google.com> #2
Dustin, could this be a case of the extra, empty, state-only insert event being a surprise to the separators logic?
If the local last prepend event doesn't have remote state attached to it, I'd expect this crash to happen, because both events would report that they terminate start:
du...@google.com <du...@google.com> #3
Hmm the check which throws this exception should wait for remote append done instead of source if remote is in use though - will need to dig into this a bit.
cc...@google.com <cc...@google.com> #4
That's what the line in the link above should accomplish:
val endState = prepend
As long as there's a mediator state,
So the "instead of source" should be handled by treating that source=done prepend as non-terminal.
du...@google.com <du...@google.com>
ap...@google.com <ap...@google.com> #5
Branch: androidx-master-dev
commit 45e2955b8ecc7881f0264bed9e982a9476cd6648
Author: Dustin Lam <dustinlam@google.com>
Date: Fri Oct 30 18:41:32 2020
Handle remote PREPEND / APPEND from previous generation
This fixes an issue with RemoteMediator state being multi-generational,
in cases where empty remote PREPEND / APPEND insert events are sent to
update LoadState from a previous generation, they can appear surface before
local PREPEND / APPEND has finished.
This change now checks for both source + remote state before adding the
footer / header to account for the broken assumption that remote APPEND
/ PREPEND always happens after source endOfPaginationReached.
Fixes: 172000108
Test: ./gradlew paging:paging-common:test
Change-Id: I3a260ff98f07f5be615192e31ce1dc533c8b75b8
M paging/common/src/main/kotlin/androidx/paging/Separators.kt
M paging/common/src/test/kotlin/androidx/paging/SeparatorsWithRemoteMediatorTest.kt
ma...@gmail.com <ma...@gmail.com> #6
Separators with PagingSource works fine, but with RemoteMediator - IllegalArgEx appears.
When to expect a new release of paging 3?
Description
Component used: Paging 3 Version used: 3.0.0-alpha08 Devices/Android versions reproduced on: Samsung S9+ / Android 10
I have used codelab project:https://github.com/googlecodelabs/android-paging/tree/step13-19_network_and_database
Branch:
step13-19_network_and_database
Changes:
Got crash:
Steps to reproduce:
It does not happen with 3.0.0-alpha07