Add channel tabs and pagination

Fix #135
This commit is contained in:
Arkadiusz Fal
2023-02-28 21:03:02 +01:00
parent d58026bcef
commit f1e132a909
11 changed files with 217 additions and 47 deletions

View File

@@ -110,12 +110,12 @@ final class SubscribedChannelsModel: ObservableObject, CacheModel {
if let json = try? storage?.object(forKey: channelsCacheKey(account)),
let channels = json.dictionaryValue["channels"]
{
return channels.arrayValue.map { json in
return channels.arrayValue.compactMap { json in
let channel = Channel.from(json)
if !channel.hasExtendedDetails,
let cache = ChannelsCacheModel.shared.retrieve(channel.cacheKey)
{
return cache
return cache.channel
}
return channel