-
Notifications
You must be signed in to change notification settings - Fork 271
fix: Issue #95 with RemoteMediator First Load #112
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
fix: Issue #95 with RemoteMediator First Load #112
Conversation
Upgrading dependencies and moving lambda code to blocks
Migrating to Jetpack
Bumping versions
…-gradle-plugin Use the stable version of Android Gradle Plugin instead of an alpha version
) * Having the list backed by network only * Showing an infinite scrolling list, from network, with Flow * Using more KTX functionality and making the error an exception instead of string * Adding ViewBinding * Making the UI more material * Removing searchRepos helper method * Making the project compatible with Android Studio 3.6 * Step 0 - An infinite scrolling list, using Flow and LiveData * Addressing review comments: * Increasing build versions * Formatting * Added RequiresOptIn flag for coroutines and removing FlowPreview annotations * [Bug fix] Don't increment the last requested page if the request failed * Avoid duplicating data * Libraries bump and removing Room annotations from Repo
• Disable Prepend loads which are not used. • Set default index for the first load in Append loads. This will crash on the first load otherwise. • Remove RecyclerView flicker during loading state
|
in my case I remove the throw exception and replace them |
Yees, I did the same. Happy to see that someone did the same as I did. That solution worked also for me. |
|
What is the correct approach here? Any clue on why is it crashing? |
fbf8ed3 to
a42d4a1
Compare
a42d4a1 to
a7498e8
Compare
|
@johnjake and @CelikAbdullah, this is a good solution as well! |
a7498e8 to
cf1c73b
Compare
LoadType.APPEND -> return MediatorResult.Success(endOfPaginationReached = true) , lead to load more trigger does not work at first launch.
|
5f1732e to
6d26524
Compare
6d26524 to
39ffae8
Compare
39ffae8 to
1825ec5
Compare
c9eebf1 to
c5ea59c
Compare
a97db3c to
89de571
Compare
Changes Summary
This resolves Issue #95.
1. Disable Prepend loads
This error occurs on the first load since prepend is not enabled.
Full error log
2. Set default index for the first load in Append loads.
This error occurs on the first load since the database has not yet been loaded with data.
Full error log
3. Remove RecyclerView flicker during loading state.
The flicker was occurring every time new data was loaded.