Rollback and merge

This commit is contained in:
James Barnsley
2017-08-22 21:20:02 +12:00
3 changed files with 59 additions and 57 deletions

View File

@ -100,12 +100,12 @@ class App extends React.Component{
var height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0)
if (width <= 800){
if (!global.slim_mode){
global.slim_mode = true
if (!this.props.slim_mode){
this.props.uiActions.setSlimMode(true)
}
} else {
if (global.slim_mode){
global.slim_mode = false
if (this.props.slim_mode){
this.props.uiActions.setSlimMode(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 (global.slim_mode) className += ' slim-mode'
if (this.props.slim_mode) className += ' slim-mode'
if (helpers.isTouchDevice()){
className += ' touch'
} else {
@ -254,6 +254,7 @@ 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 : []),