From 754db717ccb52c2fd31274f2819edb4767a1bc09 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 6 Jun 2022 12:36:07 -0700 Subject: [PATCH] Used savedat instead of createdat for sort descriptors --- apple/OmnivoreKit/Sources/Models/LinkedItemSort.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Models/LinkedItemSort.swift b/apple/OmnivoreKit/Sources/Models/LinkedItemSort.swift index ba0919203..0c5efd1fa 100644 --- a/apple/OmnivoreKit/Sources/Models/LinkedItemSort.swift +++ b/apple/OmnivoreKit/Sources/Models/LinkedItemSort.swift @@ -42,9 +42,9 @@ public extension LinkedItemSort { var sortDescriptors: [NSSortDescriptor] { switch self { case .newest /* , .relevance */: - return [NSSortDescriptor(keyPath: \LinkedItem.createdAt, ascending: false)] + return [NSSortDescriptor(keyPath: \LinkedItem.savedAt, ascending: false)] case .oldest: - return [NSSortDescriptor(keyPath: \LinkedItem.createdAt, ascending: true)] + return [NSSortDescriptor(keyPath: \LinkedItem.savedAt, ascending: true)] // case .recentlyRead: // return [NSSortDescriptor(keyPath: \LinkedItem.updatedAt, ascending: false)] case .recentlyPublished: