-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Added loading of items when the view can't be scrolled #7638
Added loading of items when the view can't be scrolled #7638
Conversation
app/src/main/java/org/schabi/newpipe/fragments/list/BaseListFragment.java
Show resolved
Hide resolved
…agment.java Co-authored-by: Mohammed Anas <triallax@tutanota.com>
Kudos, SonarCloud Quality Gate passed! |
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.
Thank you for the PR 😄
It seems to work but:
this seems to work just by sheer luck:
I don't know who designed an API that calls onScrolled when no scroll event occurs...- This will be called whenever a scroll occurs - that can be quite resource intensitive
Let's have a look at the problem:
So there is not enough data initially loaded.
Then I think we should load enough data initially:
- initially load the data
- if there is more data loadable and the view is not scrollable → load more data
- repeat above if needed
I will try to create a PR for my mentioned resolution this week.
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.
Sorry but I have to block the PR:
Tested the PR again - on a tablet and with grid mode - and the search crashes in >60% of all cases:
NP7638NW.gif.mp4
PS: I'm still working on the PR but I run into some unexpected errors when using RecyclerView which might be related to #4475
The previous/reverted behavior caused unwanted data transmission: * Removed loading via handleResults/loadMoreItems-callback because the RecyclerView is apparently not immediately updated in the UI when the data is set which causes one load of data to much.
Superseded by #7659 Anyway thank you for the work 😄 |
The previous/reverted behavior caused unwanted data transmission: * Removed loading via handleResults/loadMoreItems-callback because the RecyclerView is apparently not immediately updated in the UI when the data is set which causes one load of data to much.
The previous/reverted behavior caused unwanted data transmission: * Removed loading via handleResults/loadMoreItems-callback because the RecyclerView is apparently not immediately updated in the UI when the data is set which causes one load of data to much.
The previous/reverted behavior caused unwanted data transmission: * Removed loading via handleResults/loadMoreItems-callback because the RecyclerView is apparently not immediately updated in the UI when the data is set which causes one load of data to much.
What is it?
Description of the changes in your PR
Before/After Screenshots/Screen Record
Fixes the following issue(s)
Relies on the following changes
APK testing
Comment:
I ran into the bug Crash in lists (ViewHolder views not attached) #4475 several times when I was testing the grid view on a tablet emulator. I just wanted to make you aware of that.
I didn't know how to test the local list
Due diligence