Add DeepLink support (#6869)

This commit is contained in:
Elias Nahum
2022-12-16 18:57:15 +02:00
committed by GitHub
parent aff0de5a13
commit e294b07418
25 changed files with 295 additions and 252 deletions

View File

@@ -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);
}
};

View File

@@ -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 {