Call Linking.getInitialURL() in launchApp (#3844)

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
This commit is contained in:
Mattermost Build
2020-01-22 19:45:20 +01:00
committed by Miguel Alatzar
parent a7dc68b40b
commit dddcbefefe
2 changed files with 6 additions and 5 deletions

View File

@@ -29,7 +29,8 @@
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View File

@@ -58,6 +58,10 @@ const launchApp = (credentials) => {
telemetry.startSinceLaunch(['start:splash_screen']);
EphemeralStore.appStarted = true;
Linking.getInitialURL().then((url) => {
store.dispatch(setDeepLinkURL(url));
});
};
const launchAppAndAuthenticateIfNeeded = async (credentials) => {
@@ -73,10 +77,6 @@ const launchAppAndAuthenticateIfNeeded = async (credentials) => {
await emmProvider.handleAuthentication(store);
}
}
Linking.getInitialURL().then((url) => {
store.dispatch(setDeepLinkURL(url));
});
};
Navigation.events().registerAppLaunchedListener(() => {