mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 00:59:29 +00:00
Butterchurn reset preset cycle interval
This commit is contained in:
parent
dd1f6164d9
commit
5cfb4a3ea2
1 changed files with 4 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ interface StateProps {
|
|||
fullscreen: boolean;
|
||||
overlay: boolean;
|
||||
presetsAreCycling: boolean;
|
||||
currentPresetIndex: number | null; // Index
|
||||
trackTitle: string | null;
|
||||
}
|
||||
|
||||
|
|
@ -117,8 +118,8 @@ function Milkdrop(props: Props) {
|
|||
props.selectNextPreset,
|
||||
MILLISECONDS_BETWEEN_PRESET_TRANSITIONS
|
||||
);
|
||||
return () => clearImmediate(intervalId);
|
||||
}, [props.selectNextPreset, props.presetsAreCycling]);
|
||||
return () => clearInterval(intervalId);
|
||||
}, [props.selectNextPreset, props.presetsAreCycling, props.currentPresetIndex]);
|
||||
|
||||
const screenSize = useScreenSize();
|
||||
const windowSize = useWindowSize();
|
||||
|
|
@ -169,6 +170,7 @@ const mapStateToProps = (state: AppState): StateProps => ({
|
|||
fullscreen: Selectors.getMilkdropFullscreenEnabled(state),
|
||||
overlay: Selectors.getPresetOverlayOpen(state),
|
||||
presetsAreCycling: Selectors.getPresetsAreCycling(state),
|
||||
currentPresetIndex: Selectors.getCurrentPresetIndex(state),
|
||||
trackTitle: Selectors.getCurrentTrackDisplayName(state),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue