mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix crash with library items that have no info
This commit is contained in:
parent
3c56d01c86
commit
e407633eae
2 changed files with 5 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue