diff --git a/src/js/App.js b/src/js/App.js index 27a37991..b0a4880d 100755 --- a/src/js/App.js +++ b/src/js/App.js @@ -104,7 +104,7 @@ class App extends React.Component{ global.slim_mode = true } } else { - if (this.props.slim_mode){ + if (global.slim_mode){ global.slim_mode = false } } @@ -213,7 +213,7 @@ class App extends React.Component{ if (this.props.sidebar_open) className += ' sidebar-open' if (this.props.modal) className += ' modal-open' if (this.props.touch_dragging) className += ' touch-dragging' - if (this.props.slim_mode) className += ' slim-mode' + if (global.slim_mode) className += ' slim-mode' if (helpers.isTouchDevice()){ className += ' touch' } else { @@ -254,7 +254,6 @@ class App extends React.Component{ const mapStateToProps = (state, ownProps) => { return { touch_dragging: state.ui.touch_dragging, - slim_mode: state.ui.slim_mode, broadcasts: (state.ui.broadcasts ? state.ui.broadcasts : []), volume: (state.mopidy.volume ? state.mopidy.volume : false), notifications: (state.ui.notifications ? state.ui.notifications : []), diff --git a/src/js/components/Track.js b/src/js/components/Track.js index 9011116d..841f7381 100755 --- a/src/js/components/Track.js +++ b/src/js/components/Track.js @@ -214,7 +214,7 @@ export default class Track extends React.Component{ ) } - if (this.props.slim_mode){ + if (global.slim_mode){ // Select zone handles selection events only // We use onClick to capture touch as well as mouse events in one tidy parcel diff --git a/src/js/components/TrackList.js b/src/js/components/TrackList.js index 2bc6518f..f5d9c243 100755 --- a/src/js/components/TrackList.js +++ b/src/js/components/TrackList.js @@ -191,7 +191,7 @@ class TrackList extends React.Component{ handleSelection(e,track_key){ let selected_tracks = this.props.selected_tracks - if (e.ctrlKey || this.props.slim_mode){ + if (e.ctrlKey || global.slim_mode){ // Already selected, so unselect it if (selected_tracks.includes(track_key)){ @@ -398,7 +398,6 @@ class TrackList extends React.Component{ track={track} context={this.props.context} can_sort={this.props.context == 'queue' || this.props.context == 'editable-playlist'} - slim_mode={this.props.slim_mode} selected={this.props.selected_tracks.includes(track_key)} dragger={this.props.dragger} handleSelection={e => this.handleSelection(e, track_key)} @@ -428,7 +427,6 @@ class TrackList extends React.Component{ const mapStateToProps = (state, ownProps) => { return { selected_tracks: state.ui.selected_tracks, - slim_mode: state.ui.slim_mode, dragger: state.ui.dragger, current_track: state.core.current_track, context_menu: state.ui.context_menu diff --git a/src/js/views/Album.js b/src/js/views/Album.js index 2c473b5f..7c8f114a 100755 --- a/src/js/views/Album.js +++ b/src/js/views/Album.js @@ -122,7 +122,7 @@ class Album extends React.Component{ return (