Ensure the Activity is destroyed, it seems that the intent flags are not enough now.

This commit is contained in:
Benoit Marty 2020-11-27 15:15:56 +01:00
parent 9a8f45fc6f
commit 163f4cfaf2
2 changed files with 5 additions and 3 deletions

View File

@ -62,8 +62,8 @@ data class MainActivityArgs(
) : Parcelable
/**
* This is the entry point of RiotX
* This Activity, when started with argument, is also doing some cleanup when user disconnects,
* This is the entry point of Element Android
* This Activity, when started with argument, is also doing some cleanup when user signs out,
* clears cache, is logged out, or is soft logged out
*/
class MainActivity : VectorBaseActivity(), UnlockedActivity {
@ -78,6 +78,8 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity {
intent.putExtra(EXTRA_ARGS, args)
activity.startActivity(intent)
// Ensure the Activity is destroyed, it seems that the intent flags are not enough now.
activity.finish()
}
}

View File

@ -91,7 +91,7 @@ class HomeActivityViewModel @AssistedInject constructor(
val isVerified = it.getOrNull()?.isTrusted() ?: false
if (!isVerified && onceTrusted) {
// cross signing keys have been reset
// Tigger a popup to re-verify
// Trigger a popup to re-verify
// Note: user can be null in case of logout
safeActiveSession.getUser(safeActiveSession.myUserId)
?.toMatrixItem()