parent
ba0f689acd
commit
f5365a9d6e
|
@ -110,9 +110,17 @@ extension NotificationSettingsViewController: UITableViewDelegate {
|
|||
|
||||
let entry = sections[indexPath.section].entries[indexPath.row]
|
||||
|
||||
|
||||
switch entry {
|
||||
case .alert(_):
|
||||
break
|
||||
case .alert(let alert):
|
||||
|
||||
guard let cell = tableView.cellForRow(at: indexPath) as? NotificationSettingTableViewToggleCell else { return }
|
||||
|
||||
let newValue = (cell.toggle.isOn == false)
|
||||
cell.toggle.setOn(newValue, animated: true)
|
||||
|
||||
toggleValueChanged(cell, alert: alert, newValue: newValue)
|
||||
|
||||
case .policy:
|
||||
delegate?.showPolicyList(self, viewModel: viewModel)
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ class ToggleTableViewCell: UITableViewCell {
|
|||
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
|
||||
|
||||
contentView.addSubview(label)
|
||||
contentView.addSubview(toggle)
|
||||
setupConstraints()
|
||||
|
|
Loading…
Reference in New Issue