Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Just to let you know that this issue present in the latest available release. I did just update to alpha09 and it breaks my code. My PagingSource if a Room backed source, but I have the same issue: the paging library failed to generate a separator for the first item.
It is still working with the alpha08.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit aa90cc2cb835209e12964d3afbc91e96b6d4e36b
Author: Dustin Lam <dustinlam@google.com>
Date: Tue Nov 24 11:34:08 2020
Add empty terminal insert for separators support with RemoteMediator
Re-applies a previous hack which inserted empty insert events to allow
separators to add terminal separators (header / footer), since
Separators may need to wait for a LoadStateUpdate event to mark terminal
load state from RemoteMediator.
Fixes: 172254056
Test: ./gradlew paging:paging-common:test
Change-Id: I5c5f2ac3860889909a30cd322a1e7b36eec1a9fd
M paging/common/src/main/kotlin/androidx/paging/MutableLoadStateCollection.kt
M paging/common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/common/src/main/kotlin/androidx/paging/PageFetcher.kt
M paging/common/src/main/kotlin/androidx/paging/Separators.kt
M paging/common/src/test/kotlin/androidx/paging/PageFetcherSnapshotTest.kt
M paging/common/src/test/kotlin/androidx/paging/SeparatorsTest.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/CustomerDao.java
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/NetworkCustomerPagingSource.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RemoteMediator.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomAdapter.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomViewModel.kt
https://android-review.googlesource.com/1510174
Branch: androidx-master-dev
commit aa90cc2cb835209e12964d3afbc91e96b6d4e36b
Author: Dustin Lam <dustinlam@google.com>
Date: Tue Nov 24 11:34:08 2020
Add empty terminal insert for separators support with RemoteMediator
Re-applies a previous hack which inserted empty insert events to allow
separators to add terminal separators (header / footer), since
Separators may need to wait for a LoadStateUpdate event to mark terminal
load state from RemoteMediator.
Fixes: 172254056
Test: ./gradlew paging:paging-common:test
Change-Id: I5c5f2ac3860889909a30cd322a1e7b36eec1a9fd
M paging/common/src/main/kotlin/androidx/paging/MutableLoadStateCollection.kt
M paging/common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/common/src/main/kotlin/androidx/paging/PageFetcher.kt
M paging/common/src/main/kotlin/androidx/paging/Separators.kt
M paging/common/src/test/kotlin/androidx/paging/PageFetcherSnapshotTest.kt
M paging/common/src/test/kotlin/androidx/paging/SeparatorsTest.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/room/CustomerDao.java
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/NetworkCustomerPagingSource.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RemoteMediator.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomAdapter.kt
M paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/v3room/V3RoomViewModel.kt
jb...@google.com <jb...@google.com> #4
This has been added internally and will be available in the Navigation 2.5.0-rc01
release.
Description
Having just a
remember { }
around calls togetBackStackEntry(route)
causes new entries with the same id to use the old remember scope which can cause crashes. We should instead be telling devs to useremember(entry) { }
using the entry from thecomposable
function lambda scope as the input to theremember
calculation. This way, whenever the entry object changes, we also recompose theremember
and we never get a stale entry.