-
-
Notifications
You must be signed in to change notification settings - Fork 446
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: duplicate comments #4422
fix: duplicate comments #4422
Conversation
Can you give an example video where this happens? |
@FireMasterK I don't currently have a video of it happening, but it usually happens when doing these steps:
I have confirmed this by checking for duplicates in the |
What I think is causing the problem is the process of loading the replies of a comment and then going back, perhaps the wrong parameters are being set or overridden. I couldn't get my head around how that transition is happening (as I'm a beginner in Kotlin) |
app/src/main/java/com/github/libretube/ui/models/CommentsViewModel.kt
Outdated
Show resolved
Hide resolved
Thank you! |
You're welcome @Bnyro, although I still think that this is just a workaround to make it not happen, I'm kinda sure that the cause of the bug is something else related to moving from the comments view to a replies view and then going back. Opening replies is buggy as well, as sometimes it opens the wrong comment (I'll open a different issue for this). |
Yes, I agree, but it's better to have a temporary workaround/fix instead of keeping the issue present :) |
Fix #4291
Sometimes, the Piped API's response contains comments that were already given in previous pages, so I have added a filter to remove them.
This might not be the best way to do it, but this is my first time working with Kotlin/Android because I found this bug annoying and wanted to do whatever it takes to fix it, so if there is a better way, please do it.
:)