From 00cf035abf800881ea92672e6391b65064dd49e2 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 12 Jan 2024 10:11:28 +0800 Subject: [PATCH] Add some extra properties to the app intent --- apple/Sources/AppIntents.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apple/Sources/AppIntents.swift b/apple/Sources/AppIntents.swift index ee9d12fb3..6b183e23a 100644 --- a/apple/Sources/AppIntents.swift +++ b/apple/Sources/AppIntents.swift @@ -41,6 +41,14 @@ var omnivoreWebURL: String @Property(title: "Omnivore deeplink URL") var omnivoreShortcutURL: String + @Property(title: "Author if set") + var author: String? + @Property(title: "Site name if set") + var siteName: String? + @Property(title: "Published date if set") + var publishedAt: Date? + @Property(title: "Time the item was saved") + var savedAt: Date? init(item: Models.LibraryItem) { self.id = UUID(uuidString: item.unwrappedID)! @@ -48,6 +56,10 @@ self.originalURL = item.pageURLString self.omnivoreWebURL = "https://omnivore.app/me/\(item.slug!)" self.omnivoreShortcutURL = "omnivore://read/\(item.unwrappedID)" + self.author = item.author + self.siteName = item.siteName + self.publishedAt = item.publishDate + self.savedAt = item.savedAt } static var typeDisplayRepresentation = TypeDisplayRepresentation(