Fix crash with library items that have no info
This commit is contained in:
@ -38,7 +38,7 @@ enum LoadingBarStyle {
|
||||
@Published var selectedLabels = [LinkedItemLabel]()
|
||||
@Published var negatedLabels = [LinkedItemLabel]()
|
||||
@Published var appliedSort = LinkedItemSort.newest.rawValue
|
||||
|
||||
|
||||
@Published var digestIsUnread = false
|
||||
|
||||
@State var lastMoreFetched: Date?
|
||||
|
||||
@ -284,10 +284,11 @@ public struct LibraryItemCard: View {
|
||||
let texts = [savedAtText, estimatedReadingTimeText, readingProgressText, highlightsText, notesText]
|
||||
.compactMap { $0 }
|
||||
|
||||
texts.dropLast().reduce(Text("")) { result, text in
|
||||
if texts.count > 0 {
|
||||
texts.dropLast().reduce(Text("")) { result, text in
|
||||
result + text + Text(" • ").font(.footnote).foregroundColor(Color.themeLibraryItemSubtle)
|
||||
} + texts.last!
|
||||
// .reduce(Text(""), +)
|
||||
} + texts.last!
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user