[Feature Request]: Hide videos immediately when marking as watched, if 'hide videos on watch' is enabled.
Guidelines
- [X] I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
- [X] I have searched the documentation for information that matches the description of the feature request I want to file, without success.
- [X] This issue contains only one feature request.
Problem Description
Having the 'Hide Videos on Watch' setting enabled works great for keeping the subscriptions tab orderly. It would be nice if, when you mark a video as watched, the video would disappear immediately, as opposed to waiting for a subscription page refresh.
Proposed Solution
Removing the video from the data structure its being stored in, the list of videos displayed on the subscription page, then visually refresh the container of the list. Perhaps with a snazzy fade out effect or something.
Alternatives Considered
N/A
Issue Labels
improvement to existing feature
Additional Information
No response
I prefer the current behavior, if this will be changed i would like an setting for this.
Guidelines
- [x] I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
- [x] I have searched the documentation for information that matches the description of the feature request I want to file, without success.
- [x] This issue contains only one feature request.
Problem Description
Having the 'Hide Videos on Watch' setting enabled works great for keeping the subscriptions tab orderly. It would be nice if, when you mark a video as watched, the video would disappear immediately, as opposed to waiting for a subscription page refresh.
Proposed Solution
Removing the video from the data structure its being stored in, the list of videos displayed on the subscription page, then visually refresh the container of the list. Perhaps with a snazzy fade out effect or something.
Alternatives Considered
N/A
Issue Labels
improvement to existing feature
Additional Information
No response
I have the 'Hide Videos on Watch' setting enabled but videos are never hidden. How do I manually refresh the list of videos? I understand this doesn't currently happen automatically, but is there a way to force the list to refresh?
I have the 'Hide Videos on Watch' setting enabled but videos are never hidden. How do I manually refresh the list of videos? I understand this doesn't currently happen automatically, but is there a way to force the list to refresh?
There is a refresh button in the top right corner, below your profile icon. Please click that to refresh the view, and your "watched" marked videos should be removed. If it's not there or doesn't work, I recommend you submit a separate bug report.
I have the 'Hide Videos on Watch' setting enabled but videos are never hidden. How do I manually refresh the list of videos? I understand this doesn't currently happen automatically, but is there a way to force the list to refresh?
There is a refresh button in the top right corner, below your profile icon. Please click that to refresh the view, and your "watched" marked videos should be removed. If it's not there or doesn't work, I recommend you submit a separate bug report.
hi @crisjolliff that's not what I meant. What I mean is the page of a specific channel, like this one:
there is no way to just show the new videos and hide watched ones.
@palharesf this one is relatable to the PR you just merged but it should be simpler because here we dont have to merge settings :D
@efb4f5ff-1298-471a-8973-3d47447115dc sounds good. I'll take a detailed look at the issue and request feedback once I've developed a plan
@palharesf sound good. There is no need to implement a toggle for this like requested in the comments
Hi @efb4f5ff-1298-471a-8973-3d47447115dc - apologies for the delay, I finally had time to take a look at the problem and think of an approach.
What I'm thinking of is emitting a 'refresh-videos' event from the ft-list-video.js component when the 'markAsWatched' function is called, telling the Subscription page to refresh the videoGrid. I'm still understanding which component exactly should be listening to that event and acessing the method from the ft-refresh-widget.js component, and of course test all of it, but does that approach sound reasonable to you?
Basically I want to replicate the effects of pressing the Refresh Widget, but once the 'markAsWatched' function is called. That's the main idea, so I can re-use existing functions and methods.
PS - as mentioned, I'm assuming this will be the default implementation, and I'm not considering a setting or toggle to turn this behavior on or off.
@efb4f5ff-1298-471a-8973-3d47447115dc I've been able to propagate an event handler from the 'Mark As Watched' button all the way to the SubscriptionsTabUI component, and call a component refresh from there. It feels a bit overkill to refresh the full videoGrid everytime I mark a video as watched, but that was the first / most straight-forward way I found to implement the feature. I assume there are more elegant ways to do that, but I wanted to check how you (and the rest of the team) feel about this approach
I can also already create a PR with this implementation and let the discussion happen there. Ready to do so if preferred.
Thanks
@absidue thoughts?
Well we definitely need a different approach than that, refetching data from YouTube for every single channel in every window every time you watch a video is not a good idea.
If I were doing it I would move these lines here:
https://github.com/FreeTubeApp/FreeTube/blob/22f0affd576f74e3a936c24125fa11a340c87b1a/src/renderer/helpers/subscriptions.js#L34-L40
into a computed ref in SubscriptionTabUi, which takes props.videoList as the input/list to filter and then use that computed ref in activeVideoList instead of props.activeVideoList. You'll also want to create a computed ref for historyCacheById instead of reading it directly in that first new computed.
@absidue - thank you for the feedback. My initial hunch was to look at the video dropdown menu and emit an event every time users clicked on 'Mark as Watched', propagating that event from the child component (ft-list-video.js) towards the parent component (from ft-list-video.js to FtElementList.vue to FtListLazyWrapper.vue to finally SubscriptionsTabUi.vue), and then listen to the event and trigger a refresh there. I knew replicating the functionality from the FtRefreshWidget would be overkill, but it made sense as a starting point for me.
But your solution, of simply watching the history and excluding those results from the videoList array is not only simpler, it also performs better. Here's how it's looking like now:
I'll clean up the code and do some additional tests, but I believe I can create the PR shortly. Thank you so much for your thoughts, my job was pretty much done before I even started :)