Remove some Spacer()

This commit is contained in:
Thomas Ricouard 2024-01-11 19:53:21 +01:00
parent fab23cbafc
commit 68b7d469f5
3 changed files with 17 additions and 18 deletions

View file

@ -107,24 +107,23 @@ public struct StatusRowCardView: View {
.accessibilityHidden(true)
.frame(height: imageHeight)
}
HStack {
VStack(alignment: .leading, spacing: 6) {
Text(title)
.font(.scaledHeadline)
VStack(alignment: .leading, spacing: 6) {
Text(title)
.font(.scaledHeadline)
.lineLimit(3)
if let description = card.description, !description.isEmpty {
Text(description)
.font(.scaledBody)
.foregroundStyle(.secondary)
.lineLimit(3)
if let description = card.description, !description.isEmpty {
Text(description)
.font(.scaledBody)
.foregroundStyle(.secondary)
.lineLimit(3)
}
Text(url.host() ?? url.absoluteString)
.font(.scaledFootnote)
.foregroundColor(theme.tintColor)
.lineLimit(1)
}
Spacer()
}.padding(16)
Text(url.host() ?? url.absoluteString)
.font(.scaledFootnote)
.foregroundColor(theme.tintColor)
.lineLimit(1)
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(16)
}
private func iconLinkPreview(_ title: String, _ url: URL) -> some View {

View file

@ -48,8 +48,8 @@ struct StatusRowDetailView: View {
Text(editedAt.asDate, style: .date) +
Text("status.summary.at-time") +
Text(editedAt.asDate, style: .time)
Spacer()
}
.frame(maxWidth: .infinity, alignment: .leading)
.onTapGesture {
viewModel.routerPath.presentedSheet = .statusEditHistory(status: viewModel.status.id)
}

View file

@ -27,8 +27,8 @@ struct StatusRowTextView: View {
.environment(\.openURL, OpenURLAction { url in
viewModel.routerPath.handleStatus(status: viewModel.finalStatus, url: url)
})
Spacer()
}
.frame(maxWidth: .infinity, alignment: .leading)
makeCollapseButton()
}
}