Adding mopidy connection delay to prevent components needing to handle it

This commit is contained in:
James Barnsley
2020-08-11 21:05:36 +12:00
parent 86aad6df0e
commit a612a6a626
16 changed files with 463 additions and 535 deletions

View File

@ -23,14 +23,14 @@ class QueueHistory extends React.Component {
if (!prev_mopidy_connected && mopidy_connected) this.loadHistory();
}
loadHistory = (props = this.props) => {
loadHistory = () => {
const {
mopidyActions: { getQueueHistory },
mopidyActions: {
getQueueHistory,
},
} = this.props;
if (props.mopidy_connected) {
getQueueHistory();
}
getQueueHistory();
}
onBack = () => {