add time label on search result cell

pull/891/head
Ryan ZHAO 2 years ago
parent a4286212b4
commit a537e3af7c

@ -340,10 +340,21 @@ struct SearchResultCell: View {
alignment: .leading, alignment: .leading,
spacing: Values.verySmallSpacing spacing: Values.verySmallSpacing
) { ) {
Text(viewModel.displayName) HStack {
.bold() Text(viewModel.displayName)
.font(.system(size: Values.mediumFontSize)) .bold()
.foregroundColor(themeColor: .textPrimary) .font(.system(size: Values.mediumFontSize))
.foregroundColor(themeColor: .textPrimary)
Spacer()
if searchSection == .messages {
Text(viewModel.lastInteractionDate.formattedForDisplay)
.font(.system(size: Values.smallFontSize))
.foregroundColor(themeColor: .textSecondary)
.opacity(Values.lowOpacity)
}
}
if let textColor: UIColor = ThemeManager.currentTheme.color(for: .textPrimary) { if let textColor: UIColor = ThemeManager.currentTheme.color(for: .textPrimary) {
let maybeSnippet: NSAttributedString? = { let maybeSnippet: NSAttributedString? = {
@ -396,7 +407,7 @@ struct SearchResultCell: View {
Spacer(minLength: 0) Spacer(minLength: 0)
} }
.padding(.horizontal, Values.mediumSpacing) .padding(.leading, Values.mediumSpacing)
} }
} }

Loading…
Cancel
Save