|
|
|
@ -80,7 +80,6 @@ const mapStateToProps = state => ({
|
|
|
|
|
hasComposingText: state.getIn(['compose', 'text']).trim().length !== 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,
|
|
|
|
|
dropdownMenuIsOpen: state.dropdownMenu.openId !== null,
|
|
|
|
|
firstLaunch: state.getIn(['settings', 'introductionVersion'], 0) < INTRODUCTION_VERSION,
|
|
|
|
|
username: state.getIn(['accounts', me, 'username']),
|
|
|
|
|
});
|
|
|
|
@ -262,7 +261,6 @@ class UI extends PureComponent {
|
|
|
|
|
hasMediaAttachments: PropTypes.bool,
|
|
|
|
|
canUploadMore: PropTypes.bool,
|
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
|
dropdownMenuIsOpen: PropTypes.bool,
|
|
|
|
|
layout: PropTypes.string.isRequired,
|
|
|
|
|
firstLaunch: PropTypes.bool,
|
|
|
|
|
username: PropTypes.string,
|
|
|
|
@ -555,7 +553,7 @@ class UI extends PureComponent {
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
|
const { draggingOver } = this.state;
|
|
|
|
|
const { children, isComposing, location, dropdownMenuIsOpen, layout } = this.props;
|
|
|
|
|
const { children, isComposing, location, layout } = this.props;
|
|
|
|
|
|
|
|
|
|
const handlers = {
|
|
|
|
|
help: this.handleHotkeyToggleHelp,
|
|
|
|
@ -581,7 +579,7 @@ class UI extends PureComponent {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<HotKeys keyMap={keyMap} handlers={handlers} ref={this.setHotkeysRef} attach={window} focused>
|
|
|
|
|
<div className={classNames('ui', { 'is-composing': isComposing })} ref={this.setRef} style={{ pointerEvents: dropdownMenuIsOpen ? 'none' : null }}>
|
|
|
|
|
<div className={classNames('ui', { 'is-composing': isComposing })} ref={this.setRef}>
|
|
|
|
|
<Header />
|
|
|
|
|
|
|
|
|
|
<SwitchingColumnsArea location={location} singleColumn={layout === 'mobile' || layout === 'single-column'}>
|
|
|
|
|