When you visit a channel that you are already subscribed to, we update the subscription cache with the data we fetched to display on that channel. This pull request expands that to cover subscribing to a channel on the channel page too, as we already have the data we might as well add it to the cache. While this doesn't specifically help with the scenario in the video in this comment https://github.com/FreeTubeApp/FreeTube/pull/5185#pullrequestreview-2305874622 (subscribing from the search results), it does solve it for the channel page.
As YouTube doesn't provide any published dates on the shorts tab, we unfortunately cannot cache the data from that tab, however we can still cache the videos, live and community tabs.
Testing
Turn off "Subscription Settings" -> "Fetch Feed Automatically"
Refresh your subscriptions
Subscribe to a channel that you are not subscribed to yet from the search page
Visit the subscriptions page
Notice that instead of showing the cached videos it says that you have turned off automatic fetching
Unsubscribe from that channel from any page that is not the channel page
Go back to the subscriptions page and notice that it shows the cached videos again
Visit the channel page of a channel you are not subscribed to yet
Subscribe to that channel from the channel page
Go back to the subscriptions page
It should be showing the previously cached videos as well as the videos from the channel you just subscribed to.
As YouTube doesn't provide any published dates on the shorts tab, we unfortunately cannot cache the data from that tab, however we can still cache the videos, live and community tabs.
Update subscription cache when subscribing from the channel page
Pull Request Type
Related issue
https://github.com/FreeTubeApp/FreeTube/pull/5185#pullrequestreview-2305874622
Inspired by: #4667
Description
When you visit a channel that you are already subscribed to, we update the subscription cache with the data we fetched to display on that channel. This pull request expands that to cover subscribing to a channel on the channel page too, as we already have the data we might as well add it to the cache. While this doesn't specifically help with the scenario in the video in this comment https://github.com/FreeTubeApp/FreeTube/pull/5185#pullrequestreview-2305874622 (subscribing from the search results), it does solve it for the channel page.
As YouTube doesn't provide any published dates on the shorts tab, we unfortunately cannot cache the data from that tab, however we can still cache the videos, live and community tabs.
Testing
Desktop