From 6d61c0f9e756714d76fe82358dbbffe3ef7ffbb9 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Thu, 16 Jun 2022 22:26:39 -0700 Subject: [PATCH] resolve warnings --- .../Sources/App/Views/Registration/CreateProfileView.swift | 2 +- apple/OmnivoreKit/Sources/Models/PageScrapePayload.swift | 5 ++--- .../Services/DataService/Mutations/MergeHighlight.swift | 2 +- .../Sources/Services/DataService/OfflineSync.swift | 3 --- apple/OmnivoreKit/Sources/Views/SnackBar.swift | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apple/OmnivoreKit/Sources/App/Views/Registration/CreateProfileView.swift b/apple/OmnivoreKit/Sources/App/Views/Registration/CreateProfileView.swift index c54160557..e218f96b2 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Registration/CreateProfileView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Registration/CreateProfileView.swift @@ -168,7 +168,7 @@ struct CreateProfileView: View { .foregroundColor(.red) } } - .animation(.default) + .animation(.default, value: 0.35) VStack(alignment: .leading, spacing: 6) { Text("Bio (optional)") diff --git a/apple/OmnivoreKit/Sources/Models/PageScrapePayload.swift b/apple/OmnivoreKit/Sources/Models/PageScrapePayload.swift index 1b997e82f..12af0214f 100644 --- a/apple/OmnivoreKit/Sources/Models/PageScrapePayload.swift +++ b/apple/OmnivoreKit/Sources/Models/PageScrapePayload.swift @@ -262,9 +262,8 @@ private extension PageScrapePayload { print("error copying file locally", error) } } - // TODO: - // Don't try to handle file URLs that are not PDFs. - // In the future we can add image and other file type support here + + // If file is not a pdf then return nil return nil } return PageScrapePayload(url: url.absoluteString) diff --git a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/MergeHighlight.swift b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/MergeHighlight.swift index 798fcddd6..cb3e2c0d5 100644 --- a/apple/OmnivoreKit/Sources/Services/DataService/Mutations/MergeHighlight.swift +++ b/apple/OmnivoreKit/Sources/Services/DataService/Mutations/MergeHighlight.swift @@ -11,7 +11,7 @@ extension DataService { quote: String, patch: String, articleId: String, - overlapHighlightIdList: [String] // TODO: pass in annotation? + overlapHighlightIdList: [String] ) -> [String: Any]? { let internalHighlight = InternalHighlight( id: highlightID, diff --git a/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift b/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift index b8660289a..be0294a82 100644 --- a/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift +++ b/apple/OmnivoreKit/Sources/Services/DataService/OfflineSync.swift @@ -117,9 +117,6 @@ public extension DataService { Task { try await createPageFromPdf(id: id, localPdfURL: localPdfURL, url: url) } - } else { - // TODO: This is an invalid object, we should have a way of reflecting that with an error state - // updateLinkedItemStatus(id: id, status: .) } case "WEB": let id = item.unwrappedID diff --git a/apple/OmnivoreKit/Sources/Views/SnackBar.swift b/apple/OmnivoreKit/Sources/Views/SnackBar.swift index 6c8382d98..d2fee56ed 100644 --- a/apple/OmnivoreKit/Sources/Views/SnackBar.swift +++ b/apple/OmnivoreKit/Sources/Views/SnackBar.swift @@ -36,7 +36,7 @@ public struct Snackbar: View { .cornerRadius(5) .offset(x: 0, y: -8) .shadow(color: .gray, radius: 2) - .animation(Animation.spring()) + .animation(.spring(), value: true) } } }