Commit bc3afd89 authored by Amirhossein Naghshzan's avatar Amirhossein Naghshzan
Browse files

TVAccountWizard: handle onBackPressed

Change-Id: I4f03aa7df9e0f528e1c4c87101e9f4451f24ab3a
parent 420f8687
......@@ -89,8 +89,12 @@ class TVAccountWizard : BaseActivity<AccountWizardPresenter>(), AccountWizardVie
override fun goToHomeCreation() {}
override fun goToSipCreation() {}
override fun onBackPressed() {
val fragment = GuidedStepSupportFragment.getCurrentGuidedStepSupportFragment(supportFragmentManager)
if (fragment is TVProfileCreationFragment) finish() else super.onBackPressed()
when (GuidedStepSupportFragment.getCurrentGuidedStepSupportFragment(supportFragmentManager)) {
is TVProfileCreationFragment -> finish()
is TVHomeAccountCreationFragment -> finishAffinity()
is TVJamiAccountCreationFragment -> supportFragmentManager.popBackStack()
else -> super.onBackPressed()
}
}
override fun goToProfileCreation(accountCreationModel: AccountCreationModel) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment