Skip to content

Commit 7aad338

Browse files
committed
Split summery text to multiple lines for better readability.
1 parent d647f44 commit 7aad338

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

WooCommerce/Classes/Bookings/BookingList/BookingListView.swift

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,19 @@ private extension BookingListView {
152152
.frame(maxWidth: .infinity, alignment: .leading)
153153
.foregroundStyle(Color.primary)
154154

155-
Text(booking.summaryText)
156-
.font(.footnote)
157-
.fontWeight(.medium)
158-
.foregroundStyle(Color.secondary)
155+
VStack(alignment: .leading) {
156+
if let productName = booking.productName {
157+
Text(productName)
158+
.font(.footnote)
159+
.fontWeight(.medium)
160+
.foregroundStyle(Color.secondary)
161+
}
162+
163+
Text(booking.customerName)
164+
.font(.footnote)
165+
.fontWeight(.medium)
166+
.foregroundStyle(Color.secondary)
167+
}
159168

160169
HStack {
161170
BookingBadgeView(booking.attendanceStatus)

WooCommerce/Classes/Extensions/Booking+Helpers.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ extension Booking {
1313
return name.isEmpty ? Localization.guest : name
1414
}
1515

16-
var summaryText: String {
17-
return [productName, customerName]
18-
.compactMap { $0 }
19-
.joined(separator: "")
20-
}
21-
2216
var isEligibleForMarkAsPaid: Bool {
2317
bookingStatus == .unpaid
2418
}

0 commit comments

Comments
 (0)