diff --git a/src/js/views/library/LibraryBrowse.js b/src/js/views/library/LibraryBrowse.js index 4583b136..4de67c1d 100755 --- a/src/js/views/library/LibraryBrowse.js +++ b/src/js/views/library/LibraryBrowse.js @@ -11,6 +11,7 @@ import TrackList from '../../components/TrackList' import GridItem from '../../components/GridItem' import * as helpers from '../../helpers' +import * as uiActions from '../../services/ui/actions' import * as mopidyActions from '../../services/mopidy/actions' import * as spotifyActions from '../../services/spotify/actions' @@ -49,7 +50,13 @@ class LibraryBrowse extends React.Component{ playAll(e){ var tracks = this.arrangeDirectory().tracks; - this.props.mopidyActions.playURIs(helpers.arrayOf('uri',tracks), this.props.params.uri) + this.props.mopidyActions.playURIs(helpers.arrayOf('uri',tracks), this.props.params.uri); + this.props.uiActions.hideContextMenu(); + } + + goBack(e){ + window.history.back(); + this.props.uiActions.hideContextMenu(); } arrangeDirectory(directory = this.props.directory){ @@ -87,7 +94,7 @@ class LibraryBrowse extends React.Component{ if (!this.props.directory || helpers.isLoading(this.props.load_queue,['mopidy_browse'])){ return (
-
+
@@ -103,7 +110,7 @@ class LibraryBrowse extends React.Component{   Play all - @@ -213,6 +220,7 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = (dispatch) => { return { + uiActions: bindActionCreators(uiActions, dispatch), mopidyActions: bindActionCreators(mopidyActions, dispatch), spotifyActions: bindActionCreators(spotifyActions, dispatch) }