Moving artwork fetching to Mopidy actions as first call

This commit is contained in:
James Barnsley
2020-03-06 08:28:02 +13:00
parent f670cdd0ac
commit 73fb9edf03
3 changed files with 53 additions and 54 deletions

View File

@ -1,18 +1,15 @@
import React from 'react';
import { connect } from 'react-redux';
import { createStore, bindActionCreators } from 'redux';
import { bindActionCreators } from 'redux';
import * as uiActions from '../services/ui/actions';
import * as mopidyActions from '../services/mopidy/actions';
import * as lastfmActions from '../services/lastfm/actions';
import GridItem from './GridItem';
class AlbumGrid extends React.Component {
constructor(props) {
super(props);
}
handleContextMenu(e, item) {
e.preventDefault();
const data = {
@ -41,6 +38,7 @@ class AlbumGrid extends React.Component {
type="album"
item={album}
lastfmActions={this.props.lastfmActions}
mopidyActions={this.props.mopidyActions}
show_source_icon={this.props.show_source_icon}
onContextMenu={(e) => this.handleContextMenu(e, album)}
/>
@ -60,6 +58,7 @@ const mapStateToProps = (state, ownProps) => ({
const mapDispatchToProps = (dispatch) => ({
uiActions: bindActionCreators(uiActions, dispatch),
lastfmActions: bindActionCreators(lastfmActions, dispatch),
mopidyActions: bindActionCreators(mopidyActions, dispatch),
});
export default connect(mapStateToProps, mapDispatchToProps)(AlbumGrid);