[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:
Miguel Alatzar
2019-09-25 15:23:45 -07:00
committed by GitHub
parent 9975a19b91
commit 459801d10b
217 changed files with 2703 additions and 2741 deletions

View File

@@ -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 () => {