From 5dc3b94b57cada75261a7bf0683e771f6f1d2a43 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 30 Aug 2023 18:12:03 +0800 Subject: [PATCH] Update for new Swift rules --- apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift | 4 ++-- .../OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift index 7228bc3b0..e6b6fe9d5 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/GridCard.swift @@ -159,8 +159,8 @@ public struct GridCard: View { // .onTapGesture { tapHandler() } } - if let status = item.serverSyncStatus, status != ServerSyncStatus.isNSync.rawValue { - SyncStatusIcon(status: ServerSyncStatus(rawValue: Int(status)) ?? ServerSyncStatus.isNSync) + if item.serverSyncStatus != ServerSyncStatus.isNSync.rawValue { + SyncStatusIcon(status: ServerSyncStatus(rawValue: Int(item.serverSyncStatus)) ?? ServerSyncStatus.isNSync) } } .padding(.horizontal, 0) diff --git a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift index 30c523fed..9b5573ad8 100644 --- a/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift +++ b/apple/OmnivoreKit/Sources/Views/FeedItem/HomeFeedCardView.swift @@ -89,7 +89,8 @@ public struct FeedCard: View { #endif } - if let recs = Recommendation.notViewers(viewer: viewer, item.recommendations), recs.count > 0 { + let recs = Recommendation.notViewers(viewer: viewer, item.recommendations) + if recs.count > 0 { let byStr = Recommendation.byline(recs) let inStr = Recommendation.groupsLine(recs) HStack {