File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
2929@property (class , readonly , strong ) TahoeVolumeHUD *sharedManager;
3030@property (weak , nonatomic , nullable ) id <TahoeVolumeHUDDelegate> delegate;
3131
32- // / Show/update the HUD under a status bar button. `volume` is 0.0–1.0 (or 0–100; both accepted) .
32+ // / Show/update the HUD under a status bar button. `volume` is in the 0–100 range .
3333- (void )showHUDWithVolume : (double )volume usingMusicPlayer : (PlayerApplication*)controlledPlayer andLabel : (NSString *)label anchoredToStatusButton : (NSStatusBarButton *)button ;
3434
3535// / Programmatically hide it immediately.
Original file line number Diff line number Diff line change @@ -151,8 +151,8 @@ - (instancetype)initPrivate {
151151
152152- (void )showHUDWithVolume : (double )volume usingMusicPlayer : (PlayerApplication*)player andLabel : (NSString *)label anchoredToStatusButton : (NSStatusBarButton *)button {
153153 self.controlledPlayer = player;
154-
155- if (volume > 1.0 ) volume = MAX (0.0 , MIN (1.0 , volume / 100.0 ));
154+
155+ volume = MAX (0.0 , MIN (1.0 , volume / 100.0 ));
156156 self.slider .doubleValue = volume;
157157
158158 // Update header
@@ -192,7 +192,7 @@ - (void)showHUDWithVolume:(double)volume usingMusicPlayer:(PlayerApplication*)pl
192192
193193
194194- (void )setVolume : (double )volume {
195- if (volume > 1.0 ) volume = MAX (0.0 , MIN (1.0 , volume / 100.0 ));
195+ volume = MAX (0.0 , MIN (1.0 , volume / 100.0 ));
196196 self.slider .doubleValue = volume;
197197}
198198
You can’t perform that action at this time.
0 commit comments