Use a VStack for invite buttons when the HStack doesn't fit. (#5403)
The Accept/Decline labels were being wrapped onto 2 lines.
This commit is contained in:
@@ -60,7 +60,7 @@ struct HomeScreenInviteCell: View {
|
||||
// MARK: - Private
|
||||
|
||||
private var mainContent: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
VStack(alignment: .leading, spacing: 14) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
HStack(alignment: .firstTextBaseline, spacing: 16) {
|
||||
textualContent
|
||||
@@ -74,8 +74,10 @@ struct HomeScreenInviteCell: View {
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.accessibilityElement(children: .combine)
|
||||
|
||||
buttons
|
||||
.padding(.top, 14)
|
||||
ViewThatFits {
|
||||
HStack(spacing: 12) { buttons }
|
||||
VStack(spacing: 16) { Group(subviews: buttons) { ForEach($0.reversed()) { $0 } } }
|
||||
}
|
||||
.padding(.trailing, 22)
|
||||
}
|
||||
}
|
||||
@@ -108,8 +110,8 @@ struct HomeScreenInviteCell: View {
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var buttons: some View {
|
||||
HStack(spacing: 12) {
|
||||
Button {
|
||||
context.send(viewAction: .declineInvite(roomIdentifier: room.id))
|
||||
} label: {
|
||||
@@ -126,7 +128,6 @@ struct HomeScreenInviteCell: View {
|
||||
}
|
||||
.buttonStyle(.compound(.primary, size: .medium))
|
||||
}
|
||||
}
|
||||
|
||||
private var separator: some View {
|
||||
Rectangle()
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user