diff --git a/TIEcommerce/Sources/Filters/Protocols/FilterViewModelProtocol.swift b/TIEcommerce/Sources/Filters/Protocols/FilterViewModelProtocol.swift index 4a9ebb11..3cd71bdd 100644 --- a/TIEcommerce/Sources/Filters/Protocols/FilterViewModelProtocol.swift +++ b/TIEcommerce/Sources/Filters/Protocols/FilterViewModelProtocol.swift @@ -34,7 +34,6 @@ public protocol FilterViewModelProtocol: AnyObject { func filterDidSelected(atIndexPath indexPath: IndexPath) -> [Change] func toggleProperty(atIndexPath indexPath: IndexPath) -> (selected: [Property], deselected: [Property]) -// func getCellsViewModels() -> [CellViewModel] } public extension FilterViewModelProtocol { diff --git a/TIEcommerce/Sources/Filters/Views/DefaultFilterCollectionCell.swift b/TIEcommerce/Sources/Filters/Views/DefaultFilterCollectionCell.swift index c008f2e7..ad33f98e 100644 --- a/TIEcommerce/Sources/Filters/Views/DefaultFilterCollectionCell.swift +++ b/TIEcommerce/Sources/Filters/Views/DefaultFilterCollectionCell.swift @@ -37,16 +37,6 @@ open class DefaultFilterCollectionCell: ContainerCollectionViewCell, "default-filter-cell" } - open override var isSelected: Bool { - didSet { - if isSelected { - setSelectedAppearance() - } else { - setDeselectAppearance() - } - } - } - open override func configureAppearance() { super.configureAppearance() @@ -63,7 +53,15 @@ open class DefaultFilterCollectionCell: ContainerCollectionViewCell, wrappedView.text = viewModel.title - isSelected = viewModel.isSelected + setSelected(viewModel.isSelected) + } + + open func setSelected(_ isSelected: Bool) { + if isSelected { + setSelectedAppearance() + } else { + setDeselectAppearance() + } } open func setSelectedAppearance() {