diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 38f59252976..7c5560c02f4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -29,6 +29,10 @@ android:name=".mydownloads.MyDownloadsActivity" android:screenOrientation="portrait" android:theme="@style/OppiaThemeWithoutActionBar" /> + { result -> + if (result.alreadyOnBoardedApp) { + val intent = Intent(activity, ProfileActivity::class.java) + activity.startActivity(intent) + activity.finish() + } else { + showOnBoardingActivity() + } + }) + } + + private fun getOnBoardingFlow(): LiveData { + // If there's an error loading the data, assume the default. + return Transformations.map(onBoardingFlowData, ::processOnBoardingFlowResult) + } + + private fun processOnBoardingFlowResult(onBoardingResult: AsyncResult): OnBoardingFlow { + if (onBoardingResult.isFailure()) { + } + return onBoardingResult.getOrDefault(OnBoardingFlow.getDefaultInstance()) + } +} diff --git a/app/src/main/res/layout/on_boarding_activity.xml b/app/src/main/res/layout/on_boarding_activity.xml new file mode 100644 index 00000000000..031ce91cab2 --- /dev/null +++ b/app/src/main/res/layout/on_boarding_activity.xml @@ -0,0 +1,13 @@ + + + +