Skip to content

Commit

Permalink
Dont' scroll the slider if the futureSliderView is hidden.
Browse files Browse the repository at this point in the history
  • Loading branch information
n0shake committed Jan 30, 2021
1 parent 8014072 commit a0f54f3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Clocker/Panel/PanelController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,13 @@ class PanelController: ParentPanelController {
Logger.log(object: nil, for: "Scroll Event Ended")
}

futureSlider.doubleValue += Double(event.scrollingDeltaX)
sliderMoved(futureSlider!)
// We only want to move the slider if the slider is visible.
// If the parent view is hidden, then that doesn't automatically mean that all the childViews are also hidden
// Hence, check if the parent view is totally hidden or not..
if futureSliderView.isHidden == false {
futureSlider.doubleValue += Double(event.scrollingDeltaX)
sliderMoved(futureSlider!)
}
}
}

Expand Down

0 comments on commit a0f54f3

Please sign in to comment.