-
-
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
Disable feed click events while refresh overlay is shown #6550
Conversation
This patch changes click handlers for feed (Whats new) so that they do nothing while the feed is refreshing and the items being clicked are not visible.
Im not sure why CI failed. I ran |
it fails not because of your changes, see #6560. If you rebase it should be ok |
It produces error when you cilck / long click and the feed stops loading Exception
Crash log
|
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.
fix errors
@B0pol are you sure this error is caused by this PR? Not sure if I was doing something wrong but was unable to replicate as you described. I was able to replicate the same crash (on dev branch) by:
|
Yes I am. Or at least it is really weird if it's not caused by your PR.
Here is a video: 6550.mp4 |
Okay thanks. I might try to switch to getting the UI elements themselves to block anyway as this fix is rather hacky. |
I am now able to replicate the bug after building on a fresh install of android-studio. I went for these easy fix of checking for null before calling methods on the object. org.schabi.newpipe.local.subscription.SubscriptionManager.ktfun updateFromInfo(subscriptionId: Long, info: ListInfo<StreamInfoItem>) {
val subscriptionEntity = subscriptionTable.getSubscription(subscriptionId)
if (subscriptionEntity == null) return
if (info is FeedInfo) {
subscriptionEntity.name = info.name
} else if (info is ChannelInfo) {
subscriptionEntity.setData(info.name, info.avatarUrl, info.description, info.subscriberCount)
}
subscriptionTable.update(subscriptionEntity)
} For some reason android studio tells me subscriptionEntity will never be null? As in fetching an entity from the database will never return no result, but as evidenced by the crash it seems it can. However compiling this code anyway you seem to run into a bunch of seemingly unrelated sqlite errors todo with transactions occurring at the same time. Crash logs
If anyone has any insights into this stuff please let me know otherwise I might have to burn this PR: as I don't really know kotlin and am unsure how disabling click events during load is causing null pointer exceptions on a different panel. |
Never mind, not being lazy and creating a variable instead of using the already existing binding seems to fix the problem. I am not going to pretend to understand how. @B0pol would you mind confirming please. |
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.
I can confirm this simple fix works. Thank you for figuring it out! (btw the base cause was this method, but it can't be removed because that would create scrolling bugs in the video detail fragment)
…-refresh Disable feed click events while refresh overlay is shown
…ugh-feed-refresh" This reverts commit 902ef11.
This patch changes click handlers for feed (Whats new) so that they do
nothing while the feed is refreshing and the items being clicked are not
visible.
What is it?
Description of the changes in your PR
Fixes the following issue(s)
APK testing
On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.
Due diligence