Exclude Inoreader tags when syncing folders/tags. Fixes #2762

This commit is contained in:
Maurice Parker 2021-01-24 12:40:15 -06:00
parent 73ba42fa1a
commit 38640b9245
2 changed files with 12 additions and 2 deletions

View File

@ -628,7 +628,13 @@ private extension ReaderAPIAccountDelegate {
guard let tags = tags else { return }
assert(Thread.isMainThread)
let folderTags = tags.filter{ $0.tagID.contains("/label/") }
let folderTags: [ReaderAPITag]
if variant == .inoreader {
folderTags = tags.filter{ $0.type == "folder" }
} else {
folderTags = tags.filter{ $0.tagID.contains("/label/") }
}
guard !folderTags.isEmpty else { return }
os_log(.debug, log: log, "Syncing folders with %ld tags.", folderTags.count)

View File

@ -182,10 +182,14 @@ final class ReaderAPICaller: NSObject {
return
}
let url = baseURL
var url = baseURL
.appendingPathComponent(ReaderAPIEndpoints.tagList.rawValue)
.appendingQueryItem(URLQueryItem(name: "output", value: "json"))
if variant == .inoreader {
url = url?.appendingQueryItem(URLQueryItem(name: "types", value: "1"))
}
guard let callURL = url else {
completion(.failure(TransportError.noURL))
return