Skip to content

Commit

Permalink
Fix to set the 'userSubscribed' flag when a channel is freshly fetche…
Browse files Browse the repository at this point in the history
…d from Youtube
  • Loading branch information
gzsombor committed Aug 27, 2024
1 parent 98e1da0 commit 2cf6029
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public PersistentChannel getNextPageAsVideosAndUpdateChannel(@Nullable Persisten
channel.getYouTubeVideos().addAll(videos);
long lastPublish = videos.stream().mapToLong(YouTubeVideo::getPublishTimestamp).max().orElse(0);
channel.setLastVideoTime(lastPublish);
channel.setUserSubscribed(persistentChannel != null ? persistentChannel.isSubscribed() : false);
return SubscriptionsDb.getSubscriptionsDb().cacheChannel(persistentChannel, channel);
}

Expand Down

0 comments on commit 2cf6029

Please sign in to comment.