Fixed: Fetch Artists on SignalR Reconnect to prevent Store issues

pull/863/head
Qstick 6 years ago
parent a436692d06
commit 5a8b303f80

@ -9,6 +9,7 @@ import titleCase from 'Utilities/String/titleCase';
import { fetchCommands, updateCommand, finishCommand } from 'Store/Actions/commandActions'; import { fetchCommands, updateCommand, finishCommand } from 'Store/Actions/commandActions';
import { setAppValue, setVersion } from 'Store/Actions/appActions'; import { setAppValue, setVersion } from 'Store/Actions/appActions';
import { update, updateItem, removeItem } from 'Store/Actions/baseActions'; import { update, updateItem, removeItem } from 'Store/Actions/baseActions';
import { fetchArtist } from 'Store/Actions/artistActions';
import { fetchHealth } from 'Store/Actions/systemActions'; import { fetchHealth } from 'Store/Actions/systemActions';
import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions'; import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions';
import { fetchRootFolders } from 'Store/Actions/rootFolderActions'; import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
@ -68,6 +69,7 @@ const mapDispatchToProps = {
dispatchUpdate: update, dispatchUpdate: update,
dispatchUpdateItem: updateItem, dispatchUpdateItem: updateItem,
dispatchRemoveItem: removeItem, dispatchRemoveItem: removeItem,
dispatchFetchArtist: fetchArtist,
dispatchFetchHealth: fetchHealth, dispatchFetchHealth: fetchHealth,
dispatchFetchQueue: fetchQueue, dispatchFetchQueue: fetchQueue,
dispatchFetchQueueDetails: fetchQueueDetails, dispatchFetchQueueDetails: fetchQueueDetails,
@ -298,6 +300,7 @@ class SignalRConnector extends Component {
const { const {
dispatchFetchCommands, dispatchFetchCommands,
dispatchFetchArtist,
dispatchSetAppValue dispatchSetAppValue
} = this.props; } = this.props;
@ -305,6 +308,7 @@ class SignalRConnector extends Component {
// are in sync after reconnecting. // are in sync after reconnecting.
if (this.props.isReconnecting || this.props.isDisconnected) { if (this.props.isReconnecting || this.props.isDisconnected) {
dispatchFetchArtist();
dispatchFetchCommands(); dispatchFetchCommands();
repopulatePage(); repopulatePage();
} }
@ -382,6 +386,7 @@ SignalRConnector.propTypes = {
dispatchUpdate: PropTypes.func.isRequired, dispatchUpdate: PropTypes.func.isRequired,
dispatchUpdateItem: PropTypes.func.isRequired, dispatchUpdateItem: PropTypes.func.isRequired,
dispatchRemoveItem: PropTypes.func.isRequired, dispatchRemoveItem: PropTypes.func.isRequired,
dispatchFetchArtist: PropTypes.func.isRequired,
dispatchFetchHealth: PropTypes.func.isRequired, dispatchFetchHealth: PropTypes.func.isRequired,
dispatchFetchQueue: PropTypes.func.isRequired, dispatchFetchQueue: PropTypes.func.isRequired,
dispatchFetchQueueDetails: PropTypes.func.isRequired, dispatchFetchQueueDetails: PropTypes.func.isRequired,

Loading…
Cancel
Save