Skip to content

Commit

Permalink
Solve swiftlint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
GianniCarlo committed Mar 31, 2022
1 parent 84e8c24 commit 89030b2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class PlayerControlsViewController: BaseViewController<PlayerControlsCoordinator

self.setupUI()
self.setupAccessibility()
self.bindObservers()
self.bindBoostVolumeObservers()
self.bindSpeedObservers()

self.setUpTheming()
}
Expand Down Expand Up @@ -106,15 +107,17 @@ class PlayerControlsViewController: BaseViewController<PlayerControlsCoordinator
UIAccessibility.post(notification: .screenChanged, argument: self.mainContainterStackView)
}

func bindObservers() {
func bindBoostVolumeObservers() {
self.boostSwitchControl.publisher(for: .valueChanged)
.sink { [weak self] control in
guard let switchControl = control as? UISwitch else { return }

self?.viewModel.handleBoostVolumeToggle(flag: switchControl.isOn)
}
.store(in: &disposeBag)
}

func bindSpeedObservers() {
self.currentSpeedSlider.publisher(for: .valueChanged)
.sink { [weak self] control in
guard let self = self,
Expand Down

0 comments on commit 89030b2

Please sign in to comment.