Skip to content

Commit 1748cc4

Browse files
committed
Nest OrderStatusPresentation under the CellViewModel
1 parent 22d6f8b commit 1748cc4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Details/Order Summary Section/SummaryTableViewCell.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import UIKit
22
import Yosemite
33
import Gridicons
44

5-
struct OrderStatusPresentation {
6-
let style: OrderStatusEnum
7-
let title: String
8-
}
9-
105
/// The ViewModel for `SummaryTableViewCell`.
116
///
127
/// TODO This and that cell class should be renamed to be less ambiguous.
138
///
149
struct SummaryTableViewCellViewModel {
10+
fileprivate struct OrderStatusPresentation {
11+
let style: OrderStatusEnum
12+
let title: String
13+
}
14+
1515
private let billingAddress: Address?
1616
private let dateCreated: Date
1717
private let orderNumber: String
@@ -96,7 +96,7 @@ final class SummaryTableViewCell: UITableViewCell {
9696

9797
/// Displays the specified OrderStatus, and applies the right Label Style
9898
///
99-
private func display(presentation: OrderStatusPresentation) {
99+
private func display(presentation: SummaryTableViewCellViewModel.OrderStatusPresentation) {
100100
paymentStatusLabel.applyStyle(for: presentation.style)
101101
paymentStatusLabel.text = presentation.title
102102
}

0 commit comments

Comments
 (0)