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

- Improved visual feedback when switching home settings
This commit is contained in:
Gil Eluard
2021-10-11 09:52:21 +02:00
parent b569b65cd7
commit 5b00c5ee3e
5 changed files with 30 additions and 6 deletions
@@ -62,6 +62,8 @@ class SpaceMenuSwitchViewCell: UITableViewCell, SpaceMenuCell, NibReusable {
} else {
self.titleLabel.textColor = theme.colors.primaryContent
}
viewData.delegate = self
}
func update(theme: Theme) {
@@ -72,3 +74,10 @@ class SpaceMenuSwitchViewCell: UITableViewCell, SpaceMenuCell, NibReusable {
self.selectionView.backgroundColor = theme.colors.separator
}
}
// MARK: - SpaceMenuListItemViewDataDelegate
extension SpaceMenuSwitchViewCell: SpaceMenuListItemViewDataDelegate {
func spaceMenuItemValueDidChange(_ item: SpaceMenuListItemViewData) {
self.switchView.setOn((item.value as? Bool) ?? false, animated: true)
}
}