Assigned
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit b2840abbf1cbaedd7acff604b13cfd4ae626677b
Author: Dustin Lam <dustinlam@google.com>
Date: Fri Apr 02 18:03:11 2021
Prevent redundant ListUpdateCallback events from firing
Avoid sending Differ events with count == 0 where they would essentially
be no-ops.
This conflicts with using RecyclerView.AdapterDataObserver to set state
restoration policy as it causes it to fail to set in the empty case; in
order to continue supporting this it has been moved to depend on
LoadState (which is a bit roundabout, but should be equivalent).
Relnote: "Fixed an issue where Paging would sometimes send no-op differ
events to RecyclerView, which could cause certain listeners to trigger
early."
Bug: 182510751
Test: ./gradlew paging:paging-runtime:cC
Change-Id: Ic507fa793cb22ac9f8880a8f8841f8e6caa197f4
M paging/runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/runtime/src/androidTest/java/androidx/paging/StateRestorationTest.kt
M paging/runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/runtime/src/main/java/androidx/paging/PagingDataAdapter.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/PagingSourceTest.kt
https://android-review.googlesource.com/1663603
Branch: androidx-main
commit b2840abbf1cbaedd7acff604b13cfd4ae626677b
Author: Dustin Lam <dustinlam@google.com>
Date: Fri Apr 02 18:03:11 2021
Prevent redundant ListUpdateCallback events from firing
Avoid sending Differ events with count == 0 where they would essentially
be no-ops.
This conflicts with using RecyclerView.AdapterDataObserver to set state
restoration policy as it causes it to fail to set in the empty case; in
order to continue supporting this it has been moved to depend on
LoadState (which is a bit roundabout, but should be equivalent).
Relnote: "Fixed an issue where Paging would sometimes send no-op differ
events to RecyclerView, which could cause certain listeners to trigger
early."
Bug: 182510751
Test: ./gradlew paging:paging-runtime:cC
Change-Id: Ic507fa793cb22ac9f8880a8f8841f8e6caa197f4
M paging/runtime/src/androidTest/java/androidx/paging/AsyncPagingDataDifferTest.kt
M paging/runtime/src/androidTest/java/androidx/paging/StateRestorationTest.kt
M paging/runtime/src/main/java/androidx/paging/AsyncPagingDataDiffer.kt
M paging/runtime/src/main/java/androidx/paging/PagingDataAdapter.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/PagingSourceTest.kt
du...@google.com <du...@google.com> #3
Noting for posterity: we still need to also address the payload part of onChange events. We should consolidate these:
// NOTE: pass a null payload to convey null -> item, or item -> null
updateCallback.onChanged(position, count, null)
with
We should be consistent with which payload we use and convert AsyncPagingDataDiffer to use the enum.
Description
This is a followup tohttps://android-review.googlesource.com/c/platform/frameworks/support/+/1621325
see the TODO here: