From 774c2bc16c792de047e97d9ae5a30e4a3a7241e5 Mon Sep 17 00:00:00 2001 From: Satindar Dhillon Date: Mon, 27 Feb 2023 16:52:52 -0800 Subject: [PATCH] resolve or remove todo comments --- .../Views/Highlights/HighlightsListCard.swift | 3 +- .../App/Views/Home/HomeFeedDisplayText.swift | 41 +++++++++++++++++++ .../App/Views/Home/HomeFeedViewIOS.swift | 39 ------------------ .../App/Views/Home/HomeFeedViewMac.swift | 2 - .../PushNotificationSettingsView.swift | 2 +- .../Profile/RecommendationGroupView.swift | 4 +- .../Views/WebReader/WebReaderContainer.swift | 2 +- .../AudioSession/SpeechSynthesizer.swift | 2 +- .../InternalModels/InternalLinkedItem.swift | 2 +- .../Sources/Utils/ColorUtils.swift | 1 - 10 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedDisplayText.swift diff --git a/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListCard.swift b/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListCard.swift index 24c16f61a..bd59f145a 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListCard.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Highlights/HighlightsListCard.swift @@ -134,7 +134,8 @@ struct HighlightsListCard: View { .foregroundColor(.appGrayText) .frame(width: 14, height: 14) } - Text("\(LocalText.highlightCardHighlightByOther)\(highlightParams.createdBy?.name ?? "you")") // TODO: fix translation...add other/you + // fix translation...add other/you + Text("\(LocalText.highlightCardHighlightByOther)\(highlightParams.createdBy?.name ?? "you")") .font(.appFootnote) .foregroundColor(.appGrayText) } diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedDisplayText.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedDisplayText.swift new file mode 100644 index 000000000..b06f687ad --- /dev/null +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedDisplayText.swift @@ -0,0 +1,41 @@ +import Foundation +import Models +import Views + +extension LinkedItemFilter { + var displayName: String { + switch self { + case .inbox: + return LocalText.inboxGeneric + case .readlater: + return LocalText.readLaterGeneric + case .newsletters: + return LocalText.newslettersGeneric + case .recommended: + return "Recommended" + case .all: + return LocalText.allGeneric + case .archived: + return LocalText.archivedGeneric + case .hasHighlights: + return LocalText.highlightedGeneric + case .files: + return LocalText.filesGeneric + } + } +} + +public extension LinkedItemSort { + var displayName: String { + switch self { + case .newest: + return LocalText.newestGeneric + case .oldest: + return LocalText.oldestGeneric + case .recentlyRead: + return LocalText.recentlyReadGeneric + case .recentlyPublished: + return LocalText.recentlyPublishedGeneric + } + } +} diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift index 8c54a0d9a..8de07ce68 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewIOS.swift @@ -576,42 +576,3 @@ struct LinkDestination: View { } } } - -// TODO: move everything below this to another file -extension LinkedItemFilter { - var displayName: String { - switch self { - case .inbox: - return LocalText.inboxGeneric - case .readlater: - return LocalText.readLaterGeneric - case .newsletters: - return LocalText.newslettersGeneric - case .recommended: - return "Recommended" - case .all: - return LocalText.allGeneric - case .archived: - return LocalText.archivedGeneric - case .hasHighlights: - return LocalText.highlightedGeneric - case .files: - return LocalText.filesGeneric - } - } -} - -public extension LinkedItemSort { - var displayName: String { - switch self { - case .newest: - return LocalText.newestGeneric - case .oldest: - return LocalText.oldestGeneric - case .recentlyRead: - return LocalText.recentlyReadGeneric - case .recentlyPublished: - return LocalText.recentlyPublishedGeneric - } - } -} diff --git a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift index b0e4e91f9..01e542b45 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Home/HomeFeedViewMac.swift @@ -43,7 +43,6 @@ import Views viewModel: viewModel ) .contextMenu { - // TODO: add highlights view button Button( action: { viewModel.itemUnderTitleEdit = item }, label: { Label("Edit Info", systemImage: "info.circle") } @@ -145,7 +144,6 @@ import Views .sheet(item: $viewModel.itemUnderTitleEdit) { item in LinkedItemMetadataEditView(item: item) } - // TODO: add highlights view sheet .task { if viewModel.items.isEmpty { loadItems(isRefresh: true) diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift index 5ced54f95..e20cea8b9 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/PushNotificationSettingsView.swift @@ -73,7 +73,7 @@ struct PushNotificationSettingsView: View { viewModel.tryUpdateToDesired(dataService: dataService) } - Section { // TODO: double check this text + Section { Text("\(LocalText.notificationsExplainer)\n\(LocalText.notificationsTriggerExplainer)") .accentColor(.blue) } diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupView.swift index e1d55f92b..ada4bcad4 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/RecommendationGroupView.swift @@ -127,7 +127,7 @@ struct RecommendationGroupView: View { private var membersSection: some View { Section("Members") { - if !viewModel.recommendationGroup.canSeeMembers { // TODO: might need to fix text here + if !viewModel.recommendationGroup.canSeeMembers { Text(""" \(LocalText.clubsAdminDenyViewing) @@ -142,7 +142,7 @@ struct RecommendationGroupView: View { imageURL: member.profileImageURL != nil ? URL(string: member.profileImageURL!) : nil )) } - } else { // TODO: fix link text to use translation + } else { Text(""" \(LocalText.clubsNoMembers) diff --git a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift index da9c0141a..3f3044cd5 100644 --- a/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/WebReader/WebReaderContainer.swift @@ -179,7 +179,7 @@ struct WebReaderContainerView: View { Image(systemName: "sparkles") }).frame(width: 48, height: 48) - // TODO: We don't have a single note function yet + // We don't have a single note function yet // Divider() // // Button(action: addNote, label: { diff --git a/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift b/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift index 5af60dece..d9e14490f 100644 --- a/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift +++ b/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift @@ -144,7 +144,7 @@ struct SpeechSynthesizer { text: utterance.text) result.append(item) } else { - // TODO: How do we want to handle completely skipped paragraphs? + // How do we want to handle completely skipped paragraphs? } } diff --git a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift index 4f914d7e8..5b0363568 100644 --- a/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift +++ b/apple/OmnivoreKit/Sources/Services/InternalModels/InternalLinkedItem.swift @@ -145,7 +145,7 @@ extension JSONArticle { originalHtml: nil, language: language, wordsCount: wordsCount, - recommendations: [], // TODO: + recommendations: [], labels: [] ) diff --git a/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift b/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift index bedf74d1a..ac8de2840 100644 --- a/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift +++ b/apple/OmnivoreKit/Sources/Utils/ColorUtils.swift @@ -68,7 +68,6 @@ public extension Color { ) } - // TODO: remove this? var isDark: Bool { guard let lum = luminance else { return false } return lum < 0.50