Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit f6fb63875ad1ebe9927376b57003147a00c02a6a
Author: Clara Fok <clarafok@google.com>
Date: Tue Apr 04 18:26:30 2023
Deprecate LazyListScope#items extension for LazyPagingItems
This method is deprecated to encourage use of itemkey and itemContentType APIs in LazyPagingItems.
The ReplaceWith function will automatically populate the replacement with current key and contentType params. If neither of them are supplied, it will use the default implementation of each one.
Test: compose demos
Test: ./gradlew paging:paging-compose:cC
Bug: 276989796
Relnote: "The LazyListScope.items extension inside LazyPagingItems has been deprecated. Replaced with LazyListScope#items through LazyPagingItems's #itemCount, #itemKey, and #itemContent helpers."
Change-Id: I0c45926ecf7fbaa7b68fba7bb1201cdf6f13105d
M paging/paging-compose/api/current.txt
M paging/paging-compose/api/public_plus_experimental_current.txt
M paging/paging-compose/api/restricted_current.txt
M paging/paging-compose/samples/src/main/java/androidx/paging/compose/samples/PagingSample.kt
M paging/paging-compose/src/androidTest/java/androidx/paging/compose/LazyPagingItemsTest.kt
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
https://android-review.googlesource.com/2524335
Branch: androidx-main
commit f6fb63875ad1ebe9927376b57003147a00c02a6a
Author: Clara Fok <clarafok@google.com>
Date: Tue Apr 04 18:26:30 2023
Deprecate LazyListScope#items extension for LazyPagingItems
This method is deprecated to encourage use of itemkey and itemContentType APIs in LazyPagingItems.
The ReplaceWith function will automatically populate the replacement with current key and contentType params. If neither of them are supplied, it will use the default implementation of each one.
Test: compose demos
Test: ./gradlew paging:paging-compose:cC
Bug: 276989796
Relnote: "The LazyListScope.items extension inside LazyPagingItems has been deprecated. Replaced with LazyListScope#items through LazyPagingItems's #itemCount, #itemKey, and #itemContent helpers."
Change-Id: I0c45926ecf7fbaa7b68fba7bb1201cdf6f13105d
M paging/paging-compose/api/current.txt
M paging/paging-compose/api/public_plus_experimental_current.txt
M paging/paging-compose/api/restricted_current.txt
M paging/paging-compose/samples/src/main/java/androidx/paging/compose/samples/PagingSample.kt
M paging/paging-compose/src/androidTest/java/androidx/paging/compose/LazyPagingItemsTest.kt
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e738454b6f3a42ceddff8acd0f64a2e44a5608cf
Author: Clara Fok <clarafok@google.com>
Date: Wed Apr 05 17:09:42 2023
Deprecate LazyListScope#itemsIndexed extension for LazyPagingItems
This method is deprecated because index-based keys for non-null items is susceptible to error when prepending, as prepends would shift item indices.
The ReplaceWith function will direct users to the original LazyListScope.items function and auto populate the replacement with current key and contentType params. This will, however, result in compilation error as the current key/contentType is a lambda that passes in both index and item, while the replacement lambda only passes in item. Users will have to refactor the replaced code to remove use of index.
If neither key nor contentType param is supplied, it will use the default implementation of each one.
Test: compose demos
Test: ./gradlew paging:paging-compose:cC
Bug: 276989796
Relnote: "The LazyListScope.itemsIndexed extension inside LazyPagingItems has been deprecated. Replaced with LazyListScope#items through LazyPagingItems's #itemCount, #itemKey, and #itemContent helpers."
Change-Id: I92c8ffc330fd98f9fb31fe14db2da7a3f7a3b547
M paging/paging-compose/api/current.txt
M paging/paging-compose/api/public_plus_experimental_current.txt
M paging/paging-compose/api/restricted_current.txt
M paging/paging-compose/integration-tests/paging-demos/src/main/java/androidx/paging/compose/demos/room/PagingRoomSample.kt
M paging/paging-compose/samples/src/main/java/androidx/paging/compose/samples/PagingSample.kt
M paging/paging-compose/src/androidTest/java/androidx/paging/compose/LazyPagingItemsTest.kt
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
https://android-review.googlesource.com/2526344
Branch: androidx-main
commit e738454b6f3a42ceddff8acd0f64a2e44a5608cf
Author: Clara Fok <clarafok@google.com>
Date: Wed Apr 05 17:09:42 2023
Deprecate LazyListScope#itemsIndexed extension for LazyPagingItems
This method is deprecated because index-based keys for non-null items is susceptible to error when prepending, as prepends would shift item indices.
The ReplaceWith function will direct users to the original LazyListScope.items function and auto populate the replacement with current key and contentType params. This will, however, result in compilation error as the current key/contentType is a lambda that passes in both index and item, while the replacement lambda only passes in item. Users will have to refactor the replaced code to remove use of index.
If neither key nor contentType param is supplied, it will use the default implementation of each one.
Test: compose demos
Test: ./gradlew paging:paging-compose:cC
Bug: 276989796
Relnote: "The LazyListScope.itemsIndexed extension inside LazyPagingItems has been deprecated. Replaced with LazyListScope#items through LazyPagingItems's #itemCount, #itemKey, and #itemContent helpers."
Change-Id: I92c8ffc330fd98f9fb31fe14db2da7a3f7a3b547
M paging/paging-compose/api/current.txt
M paging/paging-compose/api/public_plus_experimental_current.txt
M paging/paging-compose/api/restricted_current.txt
M paging/paging-compose/integration-tests/paging-demos/src/main/java/androidx/paging/compose/demos/room/PagingRoomSample.kt
M paging/paging-compose/samples/src/main/java/androidx/paging/compose/samples/PagingSample.kt
M paging/paging-compose/src/androidTest/java/androidx/paging/compose/LazyPagingItemsTest.kt
M paging/paging-compose/src/main/java/androidx/paging/compose/LazyPagingItems.kt
cl...@google.com <cl...@google.com> #4
Fixed internally and will be available in paging-compose 1.0.0-alpha19
na...@google.com <na...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.paging:paging-compose:1.0.0-alpha19
Description