Add logic to guard behind the showOnboarding config value the Onboarding feature
This commit is contained in:
parent
b398c90f89
commit
f1f43880a7
3 changed files with 12 additions and 5 deletions
|
|
@ -6,6 +6,7 @@ import {Alert, DeviceEventEmitter, Linking, Platform} from 'react-native';
|
|||
import {Notifications} from 'react-native-notifications';
|
||||
|
||||
import {appEntry, pushNotificationEntry, upgradeEntry} from '@actions/remote/entry';
|
||||
import LocalConfig from '@assets/config.json';
|
||||
import {Screens, DeepLink, Events, Launch, PushNotification} from '@constants';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import {getActiveServerUrl, getServerCredentials, removeServerCredentials} from '@init/credentials';
|
||||
|
|
@ -99,8 +100,8 @@ const launchApp = async (props: LaunchProps, resetNavigation = true) => {
|
|||
hasCurrentUser = Boolean(currentUserId);
|
||||
}
|
||||
|
||||
// invert this logic
|
||||
if (onboadingViewed) {
|
||||
// invert this logic for onboardingViewed
|
||||
if (LocalConfig.ShowOnboarding && onboadingViewed) {
|
||||
return resetToOnboarding({...props, goToLoginServerUrl: serverUrl});
|
||||
}
|
||||
|
||||
|
|
@ -133,8 +134,8 @@ const launchApp = async (props: LaunchProps, resetNavigation = true) => {
|
|||
}
|
||||
}
|
||||
|
||||
// invert this logic
|
||||
if (!onboadingViewed) {
|
||||
// invert this logic for onboardingViewed
|
||||
if (LocalConfig.ShowOnboarding && !onboadingViewed) {
|
||||
return launchToServer(props, resetNavigation);
|
||||
}
|
||||
return resetToOnboarding(props);
|
||||
|
|
|
|||
|
|
@ -36,5 +36,6 @@
|
|||
|
||||
"ShowSentryDebugOptions": false,
|
||||
|
||||
"CustomRequestHeaders": {}
|
||||
"CustomRequestHeaders": {},
|
||||
"ShowOnboarding": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,6 +165,11 @@ lane :configure do
|
|||
json['SentryDsnAndroid'] = ENV['SENTRY_DSN_ANDROID']
|
||||
end
|
||||
|
||||
# Configure Show Onboarding
|
||||
if ENV['SHOW_ONBOARDING'] == 'true'
|
||||
json['ShowOnboarding'] = true
|
||||
end
|
||||
|
||||
# Save the config.json file
|
||||
save_json_as_file('../dist/assets/config.json', json)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue