Exclude Inoreader tags when syncing folders/tags. Fixes #2762
This commit is contained in:
parent
73ba42fa1a
commit
38640b9245
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue