Ignore "everything" folder

This commit is contained in:
Anh Do 2020-03-13 21:18:29 -04:00
parent a913b65700
commit 299619703c
No known key found for this signature in database
GPG Key ID: 451E3092F917B62D
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ extension NewsBlurFeedsResponse {
// Parse folders // Parse folders
var folders: [Folder] = [] var folders: [Folder] = []
let folderContainer = try container.nestedContainer(keyedBy: NewsBlurGenericCodingKeys.self, forKey: .folders) let folderContainer = try container.nestedContainer(keyedBy: NewsBlurGenericCodingKeys.self, forKey: .folders)
try folderContainer.allKeys.forEach { key in
// Skip "everything" folder
for key in folderContainer.allKeys where key.stringValue != " " {
let subscriptionIds = try folderContainer.decode([Int].self, forKey: key) let subscriptionIds = try folderContainer.decode([Int].self, forKey: key)
let folder = Folder(name: key.stringValue, feedIDs: subscriptionIds) let folder = Folder(name: key.stringValue, feedIDs: subscriptionIds)