Removing all but Search mopidy_connected checks

This commit is contained in:
James Barnsley
2020-08-12 08:11:39 +12:00
parent 2151c42536
commit 0aeb3221d4
11 changed files with 25 additions and 55 deletions

View File

@ -18,9 +18,8 @@ class QueueHistory extends React.Component {
this.loadHistory();
}
componentDidUpdate = ({ mopidy_connected: prev_mopidy_connected }) => {
const { mopidy_connected } = this.props;
if (!prev_mopidy_connected && mopidy_connected) this.loadHistory();
componentDidUpdate = () => {
this.loadHistory();
}
loadHistory = () => {
@ -82,7 +81,6 @@ class QueueHistory extends React.Component {
}
const mapStateToProps = (state) => ({
mopidy_connected: state.mopidy.connected,
tracks: (state.core.tracks ? state.core.tracks : {}),
queue_history: (state.mopidy.queue_history ? state.mopidy.queue_history : []),
});