From 4851db48796a2a12c3f67bf2863479ae73bdc8b6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 12 Mar 2023 22:52:54 +0100 Subject: [PATCH] Fix loading channels data in Favorites --- Shared/Home/FavoriteItemView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Shared/Home/FavoriteItemView.swift b/Shared/Home/FavoriteItemView.swift index 49e6f480..e00447e0 100644 --- a/Shared/Home/FavoriteItemView.swift +++ b/Shared/Home/FavoriteItemView.swift @@ -88,6 +88,12 @@ struct FavoriteItemView: View { channel.videos = videos ChannelsCacheModel.shared.store(channel) store.contentItems = ContentItem.array(of: videos) + } else if let channelPage: ChannelPage = response.typedContent() { + if let channel = channelPage.channel { + ChannelsCacheModel.shared.store(channel) + } + + store.contentItems = channelPage.results } } case let .channelPlaylist(_, id, title):