Fix loading channels data in Favorites

This commit is contained in:
Arkadiusz Fal 2023-03-12 22:52:54 +01:00
parent 912e1d1a23
commit 4851db4879

View File

@ -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):