Further tweak the layout

This commit is contained in:
Thomas Ricouard 2023-12-27 18:16:59 +01:00
parent bfa717bfa2
commit 21ac4cfa21
1 changed files with 10 additions and 34 deletions

View File

@ -22,9 +22,7 @@ struct StatusRowHeaderView: View {
}
.buttonStyle(.plain)
Spacer()
if !isInCaptureMode {
threadIcon
}
dateView
}
.accessibilityElement(children: .combine)
.accessibilityLabel(Text("\(viewModel.finalStatus.account.safeDisplayName)") + Text(", ") + Text(viewModel.finalStatus.createdAt.relativeFormatted))
@ -59,10 +57,10 @@ struct StatusRowHeaderView: View {
}
}
.layoutPriority(1)
}
if !redactionReasons.contains(.placeholder) {
if theme.avatarPosition == .leading {
dateView
} else {
if (theme.displayFullUsername && theme.avatarPosition == .leading) ||
theme.avatarPosition == .top {
Text("@\(theme.displayFullUsername ? viewModel.finalStatus.account.acct : viewModel.finalStatus.account.username)")
.font(.scaledFootnote)
.foregroundStyle(.secondary)
@ -71,17 +69,6 @@ struct StatusRowHeaderView: View {
}
}
}
if theme.avatarPosition == .top {
dateView
} else if theme.displayFullUsername, theme.avatarPosition == .leading {
Text("@\(viewModel.finalStatus.account.acct)")
.font(.scaledFootnote)
.foregroundStyle(.secondary)
.lineLimit(1)
.offset(y: 1)
.accountPopover(viewModel.finalStatus.account)
}
}
}
}
@ -104,15 +91,4 @@ struct StatusRowHeaderView: View {
.foregroundStyle(.secondary)
.lineLimit(1)
}
@ViewBuilder
private var threadIcon: some View {
if viewModel.isThread {
Image(systemName: "bubble.left.and.bubble.right")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 15)
.foregroundStyle(.secondary)
}
}
}