Optimize some text
This commit is contained in:
parent
cd60e0ce1a
commit
2ab52d3d3e
|
@ -27,7 +27,7 @@ struct StatusRowHeaderView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.accessibilityElement(children: .combine)
|
.accessibilityElement(children: .combine)
|
||||||
.accessibilityLabel(Text("\(viewModel.finalStatus.account.safeDisplayName)") + Text(", ") + Text(viewModel.finalStatus.createdAt.relativeFormatted))
|
.accessibilityLabel(Text("\(viewModel.finalStatus.account.safeDisplayName), \(viewModel.finalStatus.createdAt.relativeFormatted)"))
|
||||||
.accessibilityAction {
|
.accessibilityAction {
|
||||||
viewModel.navigateToAccountDetail(account: viewModel.finalStatus.account)
|
viewModel.navigateToAccountDetail(account: viewModel.finalStatus.account)
|
||||||
}
|
}
|
||||||
|
@ -84,21 +84,17 @@ struct StatusRowHeaderView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var accountBadgeView: Text {
|
private var accountBadgeView: Text? {
|
||||||
if (viewModel.status.reblogAsAsStatus ?? viewModel.status).account.bot {
|
if (viewModel.status.reblogAsAsStatus ?? viewModel.status).account.bot {
|
||||||
return Text(Image(systemName: "poweroutlet.type.b.fill")) + Text(" ")
|
return Text("\(Image(systemName: "poweroutlet.type.b.fill")) ")
|
||||||
} else if (viewModel.status.reblogAsAsStatus ?? viewModel.status).account.locked {
|
} else if (viewModel.status.reblogAsAsStatus ?? viewModel.status).account.locked {
|
||||||
return Text(Image(systemName: "lock.fill")) + Text(" ")
|
return Text("\(Image(systemName: "lock.fill")) ")
|
||||||
}
|
}
|
||||||
return Text("")
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
private var dateView: some View {
|
private var dateView: some View {
|
||||||
Group {
|
Text("\(Image(systemName: viewModel.finalStatus.visibility.iconName)) ⸱ \(viewModel.finalStatus.createdAt.relativeFormatted)")
|
||||||
Text(Image(systemName: viewModel.finalStatus.visibility.iconName)) +
|
|
||||||
Text(" ⸱ ") +
|
|
||||||
Text(viewModel.finalStatus.createdAt.relativeFormatted)
|
|
||||||
}
|
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
.font(.scaledFootnote)
|
.font(.scaledFootnote)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
|
|
Loading…
Reference in New Issue