From 99406401cc3d36d895b2d70584704f5226f2dc93 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 4 Dec 2023 16:21:54 +0800 Subject: [PATCH] Add a local filter for RSS --- .../Sources/Services/InternalModels/InternalFilter.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift index f7b27ceed..f8ca774da 100644 --- a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift +++ b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift @@ -157,6 +157,11 @@ public struct InternalFilter: Encodable, Identifiable, Hashable, Equatable { ) switch name { + case "RSS": + let feedLabelPredicate = NSPredicate( + format: "SUBQUERY(labels, $label, $label.name == \"RSS\").@count > 0" + ) + return NSCompoundPredicate(andPredicateWithSubpredicates: [notInArchivePredicate, undeletedPredicate, feedLabelPredicate]) case "Inbox": // non-archived items return NSCompoundPredicate(andPredicateWithSubpredicates: [undeletedPredicate, notInArchivePredicate])