|
@@ -198,17 +198,21 @@ class FirstRunActivity : BaseActivity(), ViewPager.OnPageChangeListener, Injecta
|
|
this,
|
|
this,
|
|
object : OnBackPressedCallback(true) {
|
|
object : OnBackPressedCallback(true) {
|
|
override fun handleOnBackPressed() {
|
|
override fun handleOnBackPressed() {
|
|
- onFinish()
|
|
|
|
|
|
+ val isFromAddAccount = intent.getBooleanExtra(EXTRA_ALLOW_CLOSE, false)
|
|
|
|
|
|
- if (intent.getBooleanExtra(EXTRA_ALLOW_CLOSE, false)) {
|
|
|
|
- onBackPressedDispatcher.onBackPressed()
|
|
|
|
|
|
+ val destination: Intent = if (isFromAddAccount) {
|
|
|
|
+ Intent(applicationContext, FileDisplayActivity::class.java)
|
|
} else {
|
|
} else {
|
|
- val intent = Intent(applicationContext, AuthenticatorActivity::class.java)
|
|
|
|
- intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
|
|
- intent.putExtra(EXTRA_EXIT, true)
|
|
|
|
- startActivity(intent)
|
|
|
|
- finish()
|
|
|
|
|
|
+ Intent(applicationContext, AuthenticatorActivity::class.java)
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (!isFromAddAccount) {
|
|
|
|
+ destination.putExtra(EXTRA_EXIT, true)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ destination.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
|
|
|
|
+ startActivity(destination)
|
|
|
|
+ finish()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
)
|
|
)
|