[Bug]: Removing a video from a playlist then immediately navigating away: video not removed
Guidelines
- [x] I have encountered this bug in the latest release of FreeTube.
- [x] I have encountered this bug in the official downloads of FreeTube.
- [x] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
- [x] I have searched the documentation for information that matches the description of the bug I want to file, without success.
- [x] This issue contains only one bug.
Describe the bug
- Go to a playlist
- Remove a video from a playlist by clicking on the rubbish bin icon
- Immediately navigate away from the playlist, e.g. by clicking on the Freetube logo at the top of the app
- Come back to the playlist by clicking on the "playlists" button on the sidebar, then on the playlist in question
- The video is still there
I can reproduce this reliably on Linux Flathub version I could not reproduce on Mac I could reproduce only very rarely on Windows
Expected Behavior
At point 5 we should observe that the removed video is no longer part of the playlist
Issue Labels
inconsistent behavior
FreeTube Version
v0.23.2
Operating System Version
Ubuntu 20.04
Installation Method
Flathub
Primary API used
Local API
Last Known Working FreeTube Version (If Any)
No response
Additional Information
No response
Nightly Build
- [ ] I have encountered this bug in the latest nightly build.
Please share a video of this behavior.
Here is the video. I am repeatedly removing the same video from a playlist, and each time I come back to the playlist the video is still there. The only workaround is to wait about 10 seconds before leaving the playlist page. If I leave it sooner than that, the video will be there and I can go on doing what I was doing in the video indefinitely. I was able to do this more than 10 times in a row, didn't capture it on video because it would be boring :-)
https://github.com/user-attachments/assets/0250d484-b1e1-4901-92ea-29f9b0f9b12c
The screencast did not record the mouse pointer so it's a bit hard to follow. Here is what I'm doing:
- click on "playlists" on the left sidebar
- click on "watch later"
- go to the video titled "The Insane Story Behind Kickstart My Heart", click on the rubbish bin icon
- click on "Freetube" logo at the top which brings me back to the subscriptions page
- rinse and repeat
The problem is that you are leaving the page before the click to undo popup has disappeared. As actually undoing the operation is a lot more complicated, we instead visually hide the video when you click the remove button and then only actually remove it from the playlist when the toast has disappeared/it is no longer possible for you to click undo. That logic happens on the playlist page, so by leaving the page before the toast has disappeared it never had a chance to actually remove the video.
Reproduced on FTA.
Also something to note:
If the user comes back to the playlist fast enough the video will still get removed
https://github.com/user-attachments/assets/b3bdce25-e891-4757-b5f9-b2db25218dc4
@absidue Ooooooh I see! Thank you for explaining. Does the toast last the same time on all platforms? For some reason on Mac I couldn’t reproduce. Or maybe I’m just slower on some computers depending on the input device I’m using…
Edit actually I think I’m faster on Mac and as @efb4f5ff-1298-471a-8973-3d47447115dc said I was getting back to the playlist before the toast disappeared. I remember still seeing the video for a fraction of a second then it was gone
Am getting the same issue. Not the worst thing in the world but I do hope this gets fixed soon. As mentioned before removing the videos and waiting about 10 seconds before refreshing does eventually remove them.
I am working on a fix for this.
The issue title says "Flathub version", but I'm experiencing the same issue on Linux using the .deb version, so perhaps the title can be updated as it's not specific to Flathub/Flatpak...
I understand why the issue happens, but the confusing part is that the popup message says "Click here to undo." But clicking anywhere on the screen (even outside the popup) undoes the deletion. Perhaps the message can be updated in the meantime to be more accurate?