forked from Ivasoft/mattermost-mobile
[MM-17560] Await dismissAllModals and popToRoot prior to calling showSearchModal (#3298)
* Patch react-native-navigation * Make navigation actions regular functions * Fix unhandled promise rejection warning * Missing semicolons * Mock navigation actions * Add unit tests for navigation actions * Place all patches in patches directory * Fix channel_info snapshot test
This commit is contained in:
@@ -19,14 +19,12 @@ import {getDisplayNameForLanguage} from 'app/utils/markdown';
|
||||
import {preventDoubleTap} from 'app/utils/tap';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
|
||||
import mattermostManaged from 'app/mattermost_managed';
|
||||
import {goToScreen} from 'app/actions/navigation';
|
||||
|
||||
const MAX_LINES = 4;
|
||||
|
||||
export default class MarkdownCodeBlock extends React.PureComponent {
|
||||
static propTypes = {
|
||||
actions: PropTypes.shape({
|
||||
goToScreen: PropTypes.func.isRequired,
|
||||
}).isRequired,
|
||||
theme: PropTypes.object.isRequired,
|
||||
language: PropTypes.string,
|
||||
content: PropTypes.string.isRequired,
|
||||
@@ -42,7 +40,7 @@ export default class MarkdownCodeBlock extends React.PureComponent {
|
||||
};
|
||||
|
||||
handlePress = preventDoubleTap(() => {
|
||||
const {actions, language, content} = this.props;
|
||||
const {language, content} = this.props;
|
||||
const {intl} = this.context;
|
||||
const screen = 'Code';
|
||||
const passProps = {
|
||||
@@ -68,7 +66,7 @@ export default class MarkdownCodeBlock extends React.PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
actions.goToScreen(screen, title, passProps);
|
||||
goToScreen(screen, title, passProps);
|
||||
});
|
||||
|
||||
handleLongPress = async () => {
|
||||
|
||||
Reference in New Issue
Block a user