diff --git a/app/components/quick_text_input.js b/app/components/quick_text_input.js index e576cb4eb..94900ac9d 100644 --- a/app/components/quick_text_input.js +++ b/app/components/quick_text_input.js @@ -77,6 +77,10 @@ export default class QuickTextInput extends React.PureComponent { this.storedValue = this.props.value; } + isFocused() { + return this.input.isFocused(); + } + focus() { this.input.focus(); } diff --git a/share_extension/ios/error_message.js b/share_extension/ios/error_message.js index 5bc28bac0..bdadbb996 100644 --- a/share_extension/ios/error_message.js +++ b/share_extension/ios/error_message.js @@ -43,7 +43,6 @@ export default function errorMessage(props) { errorMessage.propTypes = { close: PropTypes.func.isRequired, - formatMessage: PropTypes.func.isRequired, }; const getStyleSheet = makeStyleSheetFromTheme((theme) => { diff --git a/share_extension/ios/extension.js b/share_extension/ios/extension.js index d82a6ce60..e6c4e8936 100644 --- a/share_extension/ios/extension.js +++ b/share_extension/ios/extension.js @@ -7,6 +7,7 @@ import {Animated, Dimensions, NavigatorIOS, StyleSheet, View} from 'react-native import {Preferences} from 'mattermost-redux/constants'; +import initialState from 'app/initial_state'; import mattermostBucket from 'app/mattermost_bucket'; import ExtensionPost from './extension_post'; @@ -32,7 +33,7 @@ export default class SharedApp extends PureComponent { }; mattermostBucket.readFromFile('entities', props.appGroupId).then((value) => { - this.entities = value; + this.entities = value || initialState; this.setState({init: true}); }); } diff --git a/share_extension/ios/extension_post.js b/share_extension/ios/extension_post.js index 532d1a292..6d697a0dc 100644 --- a/share_extension/ios/extension_post.js +++ b/share_extension/ios/extension_post.js @@ -232,7 +232,7 @@ export default class ExtensionPost extends PureComponent { let totalSize = 0; let exceededSize = false; - if (channel.type === General.GM_CHANNEL || channel.type === General.DM_CHANNEL) { + if (channel && (channel.type === General.GM_CHANNEL || channel.type === General.DM_CHANNEL)) { channel = getChannel({entities}, channel.id); } @@ -590,7 +590,7 @@ export default class ExtensionPost extends PureComponent { const {currentUserId} = entities.users; // If no text and no files do nothing - if (!value && !files.length) { + if ((!value && !files.length) || !channel) { return; }