MM-14470 Deep links launch when app is not currently open (#3802)
Previously, deep links would only work when the app was already open/previously launched. Now, invoking a deep link launches the app if not already open, and opens the deep link destination.
This commit is contained in:
parent
92033f42ec
commit
f6ee6b767e
1 changed files with 9 additions and 0 deletions
|
|
@ -98,7 +98,15 @@ export default class PostList extends PureComponent {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const {actions, deepLinkURL} = this.props;
|
||||
|
||||
EventEmitter.on('scroll-to-bottom', this.handleSetScrollToBottom);
|
||||
|
||||
// Invoked when hitting a deep link and app is not already running.
|
||||
if (deepLinkURL) {
|
||||
this.handleDeepLink(deepLinkURL);
|
||||
actions.setDeepLinkURL('');
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
|
|
@ -108,6 +116,7 @@ export default class PostList extends PureComponent {
|
|||
this.resetPostList();
|
||||
}
|
||||
|
||||
// Invoked when hitting a deep link and app is already running.
|
||||
if (deepLinkURL && deepLinkURL !== prevProps.deepLinkURL) {
|
||||
this.handleDeepLink(deepLinkURL);
|
||||
actions.setDeepLinkURL('');
|
||||
|
|
|
|||
Loading…
Reference in a new issue