Update single user playlist view to remove videos immediately on exit
Pull Request Type
- [x] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
Undo introduced in https://github.com/FreeTubeApp/FreeTube/pull/5885 Closes https://github.com/FreeTubeApp/FreeTube/issues/6934
Description
- Error raised if out of playlist view when scheduled task for actual removing videos from playlist run
- IMO annoying to need to stay in the view for 5s when I am just trying to remove 1 finished video and play another one Undo still useful for removing multiple videos
This PR makes single playlist view remove videos queued for removal after 5s to be removed immediately once
Screenshots
Testing
- Create some really long user playlist (easier for testing, e.g. copy one from LTT long playlist
- Create 2+ windows to ensure change sync (optional, nothing changed on that side
- Remove 2+ videos, undo, ensure all removal undone (no change on other windows
- Remove 2+ videos, wait 5s, repeat N times, ensure videos are really removed (can go to another view and back to ensure
- Remove 2+ videos, exit view immediately (go back to playlists view or about/settings view or start playing one of the items) Ensure videos removed and toast closed on view changed (no longer able to undo)
- Video count shown in playlist info should be updated immediately after remove (before actual remove/undo)
See test cases from https://github.com/FreeTubeApp/FreeTube/pull/7099 too
Desktop
- OS:
- OS Version:
- FreeTube version:
Additional context
So the total watch time gets updated immediately but video count not. Best to also update the video count.
Addressed
It says "Video" has been removed but i removed multiple.
Not related to the issue. Maybe someone can create a followup PR? :)
Video count doesn't get updated on playlist page
More unrelated to this issue than the above one. That's asking for instant update of local playlist attributes and I dunno if performance would be worse (and I don't see a need for instant update
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.
@ChunkyProgrammer ~