Skip to content

Commit 57ae49b

Browse files
committed
Update TitleAndSubtitleAndStatusTableViewCell view model struct with constant properties
1 parent 2a70ab2 commit 57ae49b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

WooCommerce/Classes/ViewRelated/Coupons/CouponListViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum CouponListState {
1515

1616
final class CouponListViewModel {
1717

18-
typealias CouponListCellViewModel = TitleAndSubtitleAndStatusTableViewCell.CellViewModel
18+
typealias CouponListCellViewModel = TitleAndSubtitleAndStatusTableViewCell.ViewModel
1919

2020
/// Active state
2121
///

WooCommerce/Classes/ViewRelated/ReusableViews/TitleAndSubtitleAndStatusTableViewCell.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class TitleAndSubtitleAndStatusTableViewCell: UITableViewCell {
1717
configureLabels()
1818
}
1919

20-
func configureCell(viewModel: CellViewModel) {
20+
func configureCell(viewModel: ViewModel) {
2121
titleLabel.text = viewModel.title
2222
subtitleLabel.text = viewModel.subtitle
2323
accessibilityLabel = viewModel.accessibilityLabel
@@ -30,12 +30,12 @@ final class TitleAndSubtitleAndStatusTableViewCell: UITableViewCell {
3030
// MARK: - CellViewModel subtype
3131
//
3232
extension TitleAndSubtitleAndStatusTableViewCell {
33-
struct CellViewModel {
34-
var title: String
35-
var subtitle: String
36-
var accessibilityLabel: String
37-
var status: String
38-
var statusBackgroundColor: UIColor
33+
struct ViewModel {
34+
let title: String
35+
let subtitle: String
36+
let accessibilityLabel: String
37+
let status: String
38+
let statusBackgroundColor: UIColor
3939
}
4040
}
4141

0 commit comments

Comments
 (0)