From 2cf602938c5841412e0ea92635094cd10aef577a Mon Sep 17 00:00:00 2001 From: Zsombor Gegesy Date: Tue, 27 Aug 2024 21:01:55 +0200 Subject: [PATCH] Fix to set the 'userSubscribed' flag when a channel is freshly fetched from Youtube --- .../businessobjects/YouTube/newpipe/VideoPagerWithChannel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/VideoPagerWithChannel.java b/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/VideoPagerWithChannel.java index bbad0e387..cf05652f5 100644 --- a/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/VideoPagerWithChannel.java +++ b/app/src/main/java/free/rm/skytube/businessobjects/YouTube/newpipe/VideoPagerWithChannel.java @@ -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); }