resolve or remove todo comments

This commit is contained in:
Satindar Dhillon
2023-02-27 16:52:52 -08:00
parent ad5b6eac85
commit 774c2bc16c
10 changed files with 49 additions and 49 deletions

View File

@ -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)
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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)

View File

@ -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)
}

View File

@ -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)

View File

@ -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: {

View File

@ -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?
}
}

View File

@ -145,7 +145,7 @@ extension JSONArticle {
originalHtml: nil,
language: language,
wordsCount: wordsCount,
recommendations: [], // TODO:
recommendations: [],
labels: []
)

View File

@ -68,7 +68,6 @@ public extension Color {
)
}
// TODO: remove this?
var isDark: Bool {
guard let lum = luminance else { return false }
return lum < 0.50