-
Notifications
You must be signed in to change notification settings - Fork 540
Fix Paging 3 #3396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlecKazakova
merged 19 commits into
sqldelight:master
from
veyndan:veyndan/2022-07-19/fix-paging3
Jul 28, 2022
Merged
Fix Paging 3 #3396
AlecKazakova
merged 19 commits into
sqldelight:master
from
veyndan:veyndan/2022-07-19/fix-paging3
Jul 28, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
veyndan
commented
Jul 28, 2022
vanniktech
approved these changes
Jul 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working really well. Tested it manually and haven't found a way to break things
extensions/android-paging3/src/test/java/app/cash/sqldelight/paging3/WithPagingDataDiffer.kt
Outdated
Show resolved
Hide resolved
extensions/android-paging3/src/test/java/app/cash/sqldelight/paging3/WithPagingDataDiffer.kt
Outdated
Show resolved
Hide resolved
extensions/android-paging3/src/test/java/app/cash/sqldelight/paging3/WithPagingDataDiffer.kt
Outdated
Show resolved
Hide resolved
extensions/android-paging3/src/test/java/app/cash/sqldelight/paging3/WithPagingDataDiffer.kt
Outdated
Show resolved
Hide resolved
…aging3/WithPagingDataDiffer.kt Co-authored-by: Niklas Baudy <[email protected]>
…aging3/WithPagingDataDiffer.kt Co-authored-by: Niklas Baudy <[email protected]>
Co-authored-by: Niklas Baudy <[email protected]>
AlecKazakova
approved these changes
Jul 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MASSIVE! Thank you
Indeed, kudos to you @veyndan |
Closed
AlecKazakova
pushed a commit
that referenced
this pull request
Aug 5, 2022
* Copy-paste Room LimitOffsetPagingSource.kt and associated files https://github.com/androidx/androidx/tree/androidx-main/room/room-paging/src/main/java/androidx/room/paging * Don't limit to library scope * Remove unnecessary constructor * Remove unused argument * Remove usages of getQueryDispatcher * Remove usages of androidx.room.withTransaction * Remove usage of app.cash.sqldelight.paging3.util.queryItemCount * Rename Value to RowType to align with SQLDelight * Pass in a QueryProvider and then remove all fluff * Put queryDatabase within LimitOffsetPagingSource * Use QueryPagingSource as the invalidater * Simplify * Copy-paste tests from AndroidX * Fix test compilation * Spotless * Update extensions/android-paging3/src/test/java/app/cash/sqldelight/paging3/WithPagingDataDiffer.kt Co-authored-by: Niklas Baudy <[email protected]> * Update extensions/android-paging3/src/test/java/app/cash/sqldelight/paging3/WithPagingDataDiffer.kt Co-authored-by: Niklas Baudy <[email protected]> * Apply suggestions from code review Co-authored-by: Niklas Baudy <[email protected]> * Make the artifact a JVM one again Co-authored-by: Niklas Baudy <[email protected]>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took a lot of inspiration from Room's implementation of this class in order to implement this.
Within Cash App, I've tested it on
composable-adapter-sample
and this implementation no longer causes a bunch of glitches when we add or update items.@vanniktech Because of #2913, do you mind checking if these changes fix your use case?