Status Update
Comments
[Deleted User] <[Deleted User]> #2
Related bug - https://issuetracker.google.com/issues/124511903
Initial loads in LimitOffsetPagingSource run in transaction but subsequent loads do not because of cost of transaction. Loads rely on count query to return correct LoadResult.
If count query is outdated, i.e. large amount of data deleted, LimitOffsetPagingSource can return i.e. empty/wrong data and incorrect itemsBefore/itemsAfter/prevKey/nextKey. This can happen if outdated PagingSource doesn't get invalidated in time.
Initial loads in LimitOffsetPagingSource run in transaction but subsequent loads do not because of cost of transaction. Loads rely on count query to return correct LoadResult.
If count query is outdated, i.e. large amount of data deleted, LimitOffsetPagingSource can return i.e. empty/wrong data and incorrect itemsBefore/itemsAfter/prevKey/nextKey. This can happen if outdated PagingSource doesn't get invalidated in time.
Description
Jetpack Compose version: 1.4.1
Jetpack Compose component(s) used: SwipeToDismiss
Android Studio Build: Android Studio Giraffe | 2022.3.1 Patch 1
Kotlin version: 1.8.0
Steps to Reproduce or Code Sample to Reproduce:
Run the following code and the crash should occur immediately. It is a simple SwipeToDismiss implementation where the text "Delete" is shown when trying to swipe dismiss a view. The text should be aligned to the left for left swipes and aligned to the right for right swipes. This code was working fine before bumping the library dependencies.
This part seems to cause the crash:
Stack trace (if applicable):