Fixing chrome issue pusher callback

This commit is contained in:
James Barnsley
2018-12-08 11:59:32 +13:00
parent 078add0929
commit 291b1ed39e
8 changed files with 10320 additions and 13593 deletions

View File

@ -185,10 +185,10 @@ class PlaybackControls extends React.Component{
</section>
<section className="triggers">
<a className="control expanded-controls" onClick={() => this.setState({expanded: !this.state.expanded})}>
<a className="control expanded-controls" onClick={e => this.setState({expanded: !this.state.expanded})}>
{this.state.expanded ? <Icon name="expand_more" type="material" /> : <Icon name="expand_less" type="material" />}
</a>
<a className={"control sidebar-toggle"+(this.props.sidebar_open ? ' open' : '')} onClick={() => this.props.uiActions.toggleSidebar()}>
<a className={"control sidebar-toggle"+(this.props.sidebar_open ? ' open' : '')} onClick={e => this.props.uiActions.toggleSidebar()}>
<Icon className="open" name="menu" type="material" />
</a>
</section>

View File

@ -293,12 +293,12 @@ const PusherMiddleware = (function(){
.then(
response => {
if (action.response_callback){
store.dispatch(action.response_callback.call(this, response));
action.response_callback.call(this, response);
}
},
error => {
if (action.error_callback){
store.dispatch(action.error_callback.call(this, error));
action.error_callback.call(this, error);
} else {
store.dispatch(coreActions.handleException(
'Pusher request failed',

View File

@ -34,6 +34,7 @@ const SnapcastMiddleware = (function(){
method: 'Server.GetStatus'
},
response => {
console.log(response);
store.dispatch(snapcastActions.serverLoaded(response.server));
},
error => {