Skip to content

Commit 5e27e2e

Browse files
committed
Added cell backgroundColor change on selection
1 parent 5ed4e0c commit 5e27e2e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

WooCommerce/Classes/ViewRelated/Products/Edit Product/BottomSheetListSelector/ProductTypeBottomSheetListSelectorCommand.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ final class ProductTypeBottomSheetListSelectorCommand: BottomSheetListSelectorCo
163163
text: model.actionSheetDescription,
164164
image: model.actionSheetImage,
165165
imageTintColor: .gray(.shade20),
166-
numberOfLinesForText: 0,
167-
isActionable: false)
166+
numberOfLinesForText: 0)
168167
cell.updateUI(viewModel: viewModel)
169168
}
170169

WooCommerce/Classes/ViewRelated/Products/Edit Product/Cells/ImageAndTitleAndTextTableViewCell.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ final class ImageAndTitleAndTextTableViewCell: UITableViewCell {
132132
configureContentStackView()
133133
configureTitleAndTextStackView()
134134
applyDefaultBackgroundStyle()
135+
configureBackground()
135136
}
136137

137138
override func prepareForReuse() {
@@ -160,7 +161,6 @@ extension ImageAndTitleAndTextTableViewCell {
160161
descriptionLabel.numberOfLines = viewModel.numberOfLinesForText
161162
contentImageView.image = viewModel.image
162163
contentImageStackView.isHidden = viewModel.image == nil
163-
accessoryType = viewModel.showsDisclosureIndicator ? .disclosureIndicator : .none
164164
if viewModel.showsDisclosureIndicator {
165165
accessoryType = .disclosureIndicator
166166
} else if viewModel.isSelected {
@@ -300,6 +300,10 @@ private extension ImageAndTitleAndTextTableViewCell {
300300
func configureTitleAndTextStackView() {
301301
titleAndTextStackView.spacing = 2
302302
}
303+
func configureBackground() {
304+
selectedBackgroundView = UIView()
305+
selectedBackgroundView?.backgroundColor = .listBackground
306+
}
303307
}
304308

305309
// MARK: Accessibility

0 commit comments

Comments
 (0)