@ -79,7 +79,6 @@ const mapStateToProps = state => ({
hasComposingText : state . getIn ( [ 'compose' , 'text' ] ) . trim ( ) . length !== 0 ,
hasComposingText : state . getIn ( [ 'compose' , 'text' ] ) . trim ( ) . length !== 0 ,
hasMediaAttachments : state . getIn ( [ 'compose' , 'media_attachments' ] ) . size > 0 ,
hasMediaAttachments : state . getIn ( [ 'compose' , 'media_attachments' ] ) . size > 0 ,
canUploadMore : ! state . getIn ( [ 'compose' , 'media_attachments' ] ) . some ( x => [ 'audio' , 'video' ] . includes ( x . get ( 'type' ) ) ) && state . getIn ( [ 'compose' , 'media_attachments' ] ) . size < 4 ,
canUploadMore : ! state . getIn ( [ 'compose' , 'media_attachments' ] ) . some ( x => [ 'audio' , 'video' ] . includes ( x . get ( 'type' ) ) ) && state . getIn ( [ 'compose' , 'media_attachments' ] ) . size < 4 ,
layout _local _setting : state . getIn ( [ 'local_settings' , 'layout' ] ) ,
isWide : state . getIn ( [ 'local_settings' , 'stretch' ] ) ,
isWide : state . getIn ( [ 'local_settings' , 'stretch' ] ) ,
dropdownMenuIsOpen : state . getIn ( [ 'dropdown_menu' , 'openId' ] ) !== null ,
dropdownMenuIsOpen : state . getIn ( [ 'dropdown_menu' , 'openId' ] ) !== null ,
unreadNotifications : state . getIn ( [ 'notifications' , 'unread' ] ) ,
unreadNotifications : state . getIn ( [ 'notifications' , 'unread' ] ) ,
@ -256,7 +255,6 @@ class UI extends Component {
static propTypes = {
static propTypes = {
dispatch : PropTypes . func . isRequired ,
dispatch : PropTypes . func . isRequired ,
children : PropTypes . node ,
children : PropTypes . node ,
layout _local _setting : PropTypes . string ,
isWide : PropTypes . bool ,
isWide : PropTypes . bool ,
systemFontUi : PropTypes . bool ,
systemFontUi : PropTypes . bool ,
isComposing : PropTypes . bool ,
isComposing : PropTypes . bool ,
@ -381,7 +379,7 @@ class UI extends Component {
} ) ;
} ) ;
handleResize = ( ) => {
handleResize = ( ) => {
const layout = layoutFromWindow ( this . props . layout _local _setting ) ;
const layout = layoutFromWindow ( ) ;
if ( layout !== this . props . layout ) {
if ( layout !== this . props . layout ) {
this . handleLayoutChange . cancel ( ) ;
this . handleLayoutChange . cancel ( ) ;
@ -445,19 +443,6 @@ class UI extends Component {
}
}
}
}
UNSAFE _componentWillReceiveProps ( nextProps ) {
if ( nextProps . layout _local _setting !== this . props . layout _local _setting ) {
const layout = layoutFromWindow ( nextProps . layout _local _setting ) ;
if ( layout !== this . props . layout ) {
this . handleLayoutChange . cancel ( ) ;
this . props . dispatch ( changeLayout ( layout ) ) ;
} else {
this . handleLayoutChange ( ) ;
}
}
}
componentDidUpdate ( prevProps ) {
componentDidUpdate ( prevProps ) {
if ( this . props . unreadNotifications !== prevProps . unreadNotifications ||
if ( this . props . unreadNotifications !== prevProps . unreadNotifications ||
this . props . showFaviconBadge !== prevProps . showFaviconBadge ) {
this . props . showFaviconBadge !== prevProps . showFaviconBadge ) {