forked from Ivasoft/mattermost-mobile
Add DeepLink support (#6869)
This commit is contained in:
@@ -11,9 +11,9 @@ import {Events, Sso} from '@constants';
|
||||
import {MIN_REQUIRED_VERSION} from '@constants/supported_server';
|
||||
import {DEFAULT_LOCALE, getTranslations, t} from '@i18n';
|
||||
import {getServerCredentials} from '@init/credentials';
|
||||
import {getLaunchPropsFromDeepLink, relaunchApp} from '@init/launch';
|
||||
import * as analytics from '@managers/analytics';
|
||||
import {getAllServers} from '@queries/app/servers';
|
||||
import {handleDeepLink} from '@utils/deep_link';
|
||||
import {logError} from '@utils/log';
|
||||
|
||||
import type {jsAndNativeErrorHandler} from '@typings/global/error_handling';
|
||||
@@ -64,8 +64,7 @@ class GlobalEventHandler {
|
||||
}
|
||||
|
||||
if (event.url) {
|
||||
const props = getLaunchPropsFromDeepLink(event.url);
|
||||
relaunchApp(props);
|
||||
handleDeepLink(event.url);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ class SessionManager {
|
||||
await storeOnboardingViewedValue(false);
|
||||
}
|
||||
|
||||
relaunchApp({launchType, serverUrl, displayName}, true);
|
||||
relaunchApp({launchType, serverUrl, displayName});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -197,7 +197,7 @@ class SessionManager {
|
||||
const activeServerUrl = await DatabaseManager.getActiveServerUrl();
|
||||
const serverDisplayName = await getServerDisplayName(serverUrl);
|
||||
|
||||
await relaunchApp({launchType: Launch.Normal, serverUrl, displayName: serverDisplayName}, true);
|
||||
await relaunchApp({launchType: Launch.Normal, serverUrl, displayName: serverDisplayName});
|
||||
if (activeServerUrl) {
|
||||
addNewServer(getThemeFromState(), serverUrl, serverDisplayName);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user