fix: fix exclusion of cells

This commit is contained in:
Nikita Semenov 2022-08-09 18:02:30 +03:00
parent 73abd949eb
commit 95fc92dfca
2 changed files with 9 additions and 12 deletions

View File

@ -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 {

View File

@ -37,16 +37,6 @@ open class DefaultFilterCollectionCell: ContainerCollectionViewCell<UILabel>,
"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<UILabel>,
wrappedView.text = viewModel.title
isSelected = viewModel.isSelected
setSelected(viewModel.isSelected)
}
open func setSelected(_ isSelected: Bool) {
if isSelected {
setSelectedAppearance()
} else {
setDeselectAppearance()
}
}
open func setSelectedAppearance() {