[Spaces] M10.4.1 Home space data filtering #4570

- update after review
This commit is contained in:
Gil Eluard
2021-10-18 15:01:11 +02:00
parent b5ded8d2a7
commit 5ae64a8b9b
8 changed files with 31 additions and 44 deletions
@@ -49,20 +49,10 @@ class SpaceMenuSwitchViewCell: UITableViewCell, SpaceMenuCell, NibReusable {
// MARK: - Public
func fill(with viewData: SpaceMenuListItemViewData) {
func update(with viewData: SpaceMenuListItemViewData) {
self.titleLabel.text = viewData.title
self.switchView.isOn = (viewData.value as? Bool) ?? false
guard let theme = self.theme else {
return
}
if viewData.style == .destructive {
self.titleLabel.textColor = theme.colors.alert
} else {
self.titleLabel.textColor = theme.colors.primaryContent
}
viewData.delegate = self
}