Skip to content

Commit fa11ee4

Browse files
committed
Fix merge conflicts
1 parent 4e46634 commit fa11ee4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

WooCommerce/Classes/ViewModels/OrderDetailsViewModel.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ class OrderDetailsViewModel {
55
private let order: Order
66
private let couponLines: [CouponLine]?
77

8-
let items: [OrderItem]
9-
let fulfillTitle: String
108
init(order: Order) {
119
self.order = order
1210
self.couponLines = order.couponLines
@@ -20,6 +18,12 @@ class OrderDetailsViewModel {
2018
return String.localizedStringWithFormat(NSLocalizedString("Created %@", comment: "Order created date"), order.dateCreatedString) //FIXME: use a formatted date instead of raw timestamp
2119
}
2220

21+
var items: [OrderItem] {
22+
return order.items
23+
}
24+
25+
let fulfillTitle = NSLocalizedString("Fulfill order", comment: "Fulfill order button title")
26+
2327
var paymentStatus: String {
2428
return order.status.description
2529
}
@@ -105,7 +109,5 @@ class OrderDetailsViewModel {
105109
}
106110

107111
return NSLocalizedString("Discount", comment: "Discount label for payment view") + " (" + output + ")"
108-
items = order.items
109-
fulfillTitle = NSLocalizedString("Fulfill order", comment: "Fulfill order button title")
110112
}
111113
}

WooCommerce/Classes/ViewRelated/Orders/OrderDetails/ProductListTableViewCell.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ extension ProductListTableViewCell {
3535
}
3636
for item in viewModel.items {
3737
let itemView = TwoColumnLabelView.makeFromNib()
38-
itemView.configure(leftText: item.name, rightText: item.quantity.description)
38+
itemView.leftText = item.name
39+
itemView.rightText = item.quantity.description
3940
verticalStackView.addArrangedSubview(itemView)
4041
}
4142
let spacerView = IntrinsicHeightView()

0 commit comments

Comments
 (0)