diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift index d3d627fa1..6062be93e 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/Components/LibraryItemFetcher.swift @@ -170,7 +170,7 @@ import Views var subPredicates = [NSPredicate]() // TODO: FOLLOWING MIGRATION: invert this once the following migration has completed - if !UserDefaults.standard.bool(forKey: "LibraryTabView::hideFollowingTab") { + if !(filterState.appliedFilter?.ignoreFolders ?? false), !UserDefaults.standard.bool(forKey: "LibraryTabView::hideFollowingTab") { let folderPredicate = NSPredicate( format: "%K == %@", #keyPath(Models.LibraryItem.folder), filterState.folder ) diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift index 117e1922a..2ed12e99f 100644 --- a/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift +++ b/apple/OmnivoreKit/Sources/Services/DataService/Queries/LinkedItemNetworkQuery.swift @@ -309,7 +309,7 @@ private let syncItemEdgeSelection = Selection.SyncUpdatedItemEdge { } private let searchItemSelection = Selection.SearchItem { - InternalLibraryItem( + return InternalLibraryItem( id: try $0.id(), title: try $0.title(), createdAt: try $0.createdAt().value ?? Date(), diff --git a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift index 7830a6433..08a68f5ae 100644 --- a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift +++ b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalFilter.swift @@ -208,6 +208,10 @@ public struct InternalFilter: Encodable, Identifiable, Hashable, Equatable { predicate != nil } + public var ignoreFolders: Bool { + return name == "Deleted" + } + public var predicate: NSPredicate? { let undeletedPredicate = NSPredicate( format: "%K != %i AND %K != \"DELETED\"",