-
-
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
Fixed scrolling on refresh in the feed #6686
Conversation
Thank you! That looks good.
|
To me this was a feature not a bug. If you fix it I won't be able to tell which new videos where added to the feed. Could there be a line separator to show which new videos are added since the last update? |
That's true. Maybe we can add a chip at the top saying ":arrow_up: X new streams" with an onclick listener which triggers the scroll to top. |
I will rethink the concept when I have time again 😄 |
FYI: I'm currently experimenting using new approaches e.g.: However there seem to be some problems:
NewPipeFeedDuplicateSuccessEvents.mp4This causes problems as it can't be computed what items are new ones. @Stypox
|
@litetex I can't reproduce the double success event. Maybe you can try debugging in the only place where a success event is generated, i.e. here? If the problem is not there climb up the call stack until you find where the events are duplicated. Below I try to climb up the call stack that led to the code you are analyzing in the video above:
I think you will need to add a new item holder to work with groupie |
@Stypox Disclaimer: The following text contains 2.5 hours of research so it got a bit longer... However none of the above code seems to be the cause of the error. I think to trigger the problem at least some new feed-items have to be fetched/added and some old ones to be removed. Because when I remove
Most of them (however sometimes not all) have different List<StreamWithState> -sizes.
Usually it's 77->114->67 (last 2 differ according to current time and subscriptions) on my setup. That looks like something on the internal database is raising these events.
So I guess the database events come in too late. Source-Code I used: https://github.com/litetex/NewPipe/tree/e7e48aba35e18531800b004a9d82da5448de2d61 Maybe it's also just a race condition because I'm debugging / using an emulator... But I have at least one question regarding:
Why is there a Flowable in the first place?Should a change in the streamItems really cause further processing?
|
Sorry I closed by accident
This is really strange. It didn't seem to happen to me, and I was debugging on an emulator, too. It could as well be a race condition that should be solved.
It should in theory be there so that updates to
I am not sure I understand correctly, but I don't think changing something in those four lines would affect much performance. |
This caused duplicate events (TeamNewPipe#6686 (comment)) and unnecessary processing of items
Succeeded by #7050 |
This caused duplicate events (TeamNewPipe#6686 (comment)) and unnecessary processing of items
This caused duplicate events (TeamNewPipe#6686 (comment)) and unnecessary processing of items
This caused duplicate events (TeamNewPipe#6686 (comment)) and unnecessary processing of items
This caused duplicate events (TeamNewPipe#6686 (comment)) and unnecessary processing of items
This caused duplicate events (TeamNewPipe#6686 (comment)) and unnecessary processing of items
What is it?
Description of the changes in your PR
Before/After Screenshots/Screen Record
Click to open
Before:
Broken.mp4
After:
Fixed.mp4
Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence
How to test
→ It should now scroll to the top 🥳