* MM-9494 & MM-13888 Tapping with the keyboard opened executes the action & iOS iteractive keyboard * Fix tests * feedback review * add new line at the end of file * feedback review and added todo list * Track interactive dismiss keyboard and set scrollview bounds natively * Fix snapshots * Fastlane default to current branch when no BRANCH_TO_BUILD is set * Set NODE_OPTIONS in ios build script * Rebind scrollview when channel gets first set of posts * Keep scrolling momentum on keyboard close * Update react-native-keyboard-tracking-view * Fix ScrollView offset with keyboard-tracking * Fix offset while dragging the keyboard * Allow action on channel drawer on tablets * Fix typo Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com> * Fix indentation
26 lines
1 KiB
JavaScript
26 lines
1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
|
|
|
import {getDimensions} from 'app/selectors/device';
|
|
import {checkForFileUploadingInChannel} from 'app/selectors/file';
|
|
import {getCurrentChannelDraft, getThreadDraft} from 'app/selectors/views';
|
|
|
|
import FileUploadPreview from './file_upload_preview';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const {deviceHeight} = getDimensions(state);
|
|
const currentDraft = ownProps.rootId ? getThreadDraft(state, ownProps.rootId) : getCurrentChannelDraft(state);
|
|
|
|
return {
|
|
channelIsLoading: state.views.channel.loading,
|
|
deviceHeight,
|
|
files: currentDraft.files,
|
|
filesUploadingForCurrentChannel: checkForFileUploadingInChannel(state, ownProps.channelId, ownProps.rootId),
|
|
theme: getTheme(state),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps)(FileUploadPreview);
|