From 7fe3fc75c0231f6464f91fdd4cf8fe9507d1fe27 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Sun, 5 Jun 2022 09:09:08 -0700 Subject: [PATCH] Dont show the cloud icon while page scraping is running --- .../Sources/Views/ShareExtensionView.swift | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift b/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift index 1fc6557ab..6678e7fe5 100644 --- a/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift +++ b/apple/OmnivoreKit/Sources/Views/ShareExtensionView.swift @@ -178,8 +178,10 @@ public struct ShareExtensionChildView: View { private var cloudIconColor: Color { switch viewModel.status { - case .saved, .processing: + case .saved: return .appGrayText + case .processing: + return .clear case .failed(error: _), .syncFailed(error: _): return .red case .synced: @@ -188,12 +190,8 @@ public struct ShareExtensionChildView: View { } private func localImage(from: URL) -> Image? { - do { - if let data = try? Data(contentsOf: from), let img = UIImage(data: data) { - return Image(uiImage: img) - } - } catch { - return nil + if let data = try? Data(contentsOf: from), let img = UIImage(data: data) { + return Image(uiImage: img) } return nil }