fix for jamtrack open twice bug
This commit is contained in:
parent
493ac18650
commit
8760924e59
|
|
@ -35,12 +35,17 @@ mixins.push(Reflux.listenTo(JamTrackStore, 'onJamTrackStateChanged'))
|
|||
if window.unloaded
|
||||
return
|
||||
|
||||
if window.closed
|
||||
return
|
||||
|
||||
@monitorControls(@state.controls, @state.mediaSummary, jamTrackState)
|
||||
@setState({jamTrackState: jamTrackState})
|
||||
|
||||
onMediaStateChanged: (changes) ->
|
||||
if window.unloaded
|
||||
return
|
||||
if window.closed
|
||||
return
|
||||
|
||||
if changes.playbackStateChanged
|
||||
if @state.controls?
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ mixins.push(Reflux.listenTo(UserStore, 'onUserChanged'))
|
|||
if @unloaded
|
||||
#console.log("PopupMediaControls unloaded. ignore onMixersChnaged")
|
||||
return
|
||||
if window.closed
|
||||
return
|
||||
@setState(@updateFromMixerHelper(mixers, session))
|
||||
|
||||
|
||||
|
|
@ -71,6 +73,9 @@ mixins.push(Reflux.listenTo(UserStore, 'onUserChanged'))
|
|||
#console.log("PopupMediaControls unloaded. ignore onMixersChnaged")
|
||||
return
|
||||
|
||||
if window.closed
|
||||
return
|
||||
|
||||
if changes.currentTimeChanged && @root?
|
||||
@setState({time: changes.time})
|
||||
|
||||
|
|
@ -79,6 +84,9 @@ mixins.push(Reflux.listenTo(UserStore, 'onUserChanged'))
|
|||
#console.log("PopupMediaControls unloaded. ignore onMixersChnaged")
|
||||
return
|
||||
|
||||
if window.closed
|
||||
return
|
||||
|
||||
logger.debug("PopupMediaControls: jamtrack changed", changes)
|
||||
@setState({jamTrackState: changes})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue