-
Notifications
You must be signed in to change notification settings - Fork 271
Migrating to Paging 3.0 #41
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
Conversation
4be5340 to
7a01b04
Compare
app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/data/GithubPagingSource.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/data/GithubPagingSource.kt
Outdated
Show resolved
Hide resolved
| ) : PagingSource<Int, Repo>() { | ||
| override suspend fun load(params: LoadParams<Int>): LoadResult<Int, Repo> { | ||
| val position = params.key ?: 0 | ||
| val apiResponse = searchRepos(service, query, position, GithubRepository.NETWORK_PAGE_SIZE) |
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.
should sync with Dustin in the PagingWithNetworkSample to standardize as to whether we want to use suspend Response retrofit APIs, or the Response-less ones. I'm fine either way, but there is some value in consistency.
app/src/main/java/com/example/android/codelabs/paging/data/GithubRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/data/GithubRepository.kt
Outdated
Show resolved
Hide resolved
07c9ed6 to
ce10dce
Compare
a46568b to
0e2044f
Compare
fcc0bae to
781b2a9
Compare
ChrisCraik
left a comment
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.
Couple things I found while copying code into KDoc samples
app/src/main/java/com/example/android/codelabs/paging/ui/ReposAdapter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/ui/ReposAdapter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/ui/SearchRepositoriesViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/example/android/codelabs/paging/ui/ReposAdapter.kt
Show resolved
Hide resolved
8ea1b7a to
b8eae01
Compare
b8eae01 to
d5711cc
Compare
The role of this PR is just to showcase the differences between the starting point of the codelab and the final one, with paging added.