diff --git a/src/routes/Player/ControlBar/ControlBar.js b/src/routes/Player/ControlBar/ControlBar.js index a976d6f25..0057b03cd 100644 --- a/src/routes/Player/ControlBar/ControlBar.js +++ b/src/routes/Player/ControlBar/ControlBar.js @@ -13,7 +13,8 @@ class ControlBar extends Component { this.state = { time: -1, volume: -1, - volumeSliderOpen: false + volumePopupOpen: false, + sharePopupOpen: false }; } @@ -25,7 +26,8 @@ class ControlBar extends Component { nextProps.volume !== this.props.volume || nextState.time !== this.state.time || nextState.volume !== this.state.volume || - nextState.volumeSliderOpen !== this.state.volumeSliderOpen; + nextState.volumePopupOpen !== this.state.volumePopupOpen || + nextState.sharePopupOpen !== this.state.sharePopupOpen; } componentWillUnmount() { @@ -77,12 +79,20 @@ class ControlBar extends Component { this.props.paused ? this.props.play() : this.props.pause(); } - onVloumeSliderOpen = () => { - this.setState({ volumeSliderOpen: true }); + onVolumePopupOpen = () => { + this.setState({ volumePopupOpen: true }); } - onVolumeSliderClose = () => { - this.setState({ volumeSliderOpen: false }); + onVolumePopupClose = () => { + this.setState({ volumePopupOpen: false }); + } + + onSharePopupOpen = () => { + this.setState({ sharePopupOpen: true }); + } + + onSharePopupClose = () => { + this.setState({ sharePopupOpen: false }); } formatTime = (time) => { @@ -119,10 +129,7 @@ class ControlBar extends Component { return (