Skip to content

Commit

Permalink
Improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoncal committed Nov 7, 2023
1 parent 09921a2 commit e47f4a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/App/Settings/SettingsDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,12 @@ class SettingsDetailViewController: HAFormViewController, TypedRowControllerType
}
}

scenesUpdateObserver = scenes.observe { _ in
toggleAllSwitch.cellUpdate { cell, row in
toggleAllSwitch.cellUpdate { [weak self] cell, _ in
self?.scenesUpdateObserver = scenes.observe { _ in
cell.switchControl.setOn(scenes.filter(\.actionEnabled).count == scenes.count, animated: true)
}
toggleAllSwitch.updateCell()
}
toggleAllSwitch.updateCell()

form +++ Section(L10n.SettingsDetails.Actions.Scenes.title)
<<< toggleAllSwitch

Check warning on line 470 in Sources/App/Settings/SettingsDetailViewController.swift

View check run for this annotation

Codecov / codecov/patch

Sources/App/Settings/SettingsDetailViewController.swift#L448-L470

Added lines #L448 - L470 were not covered by tests
Expand Down

0 comments on commit e47f4a7

Please sign in to comment.