From 163f4cfaf261efd8419418cdadacf81dba08ff75 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 27 Nov 2020 15:15:56 +0100 Subject: [PATCH] Ensure the Activity is destroyed, it seems that the intent flags are not enough now. --- vector/src/main/java/im/vector/app/features/MainActivity.kt | 6 ++++-- .../im/vector/app/features/home/HomeActivityViewModel.kt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/MainActivity.kt b/vector/src/main/java/im/vector/app/features/MainActivity.kt index e553b5e0d3..f398a6ffa1 100644 --- a/vector/src/main/java/im/vector/app/features/MainActivity.kt +++ b/vector/src/main/java/im/vector/app/features/MainActivity.kt @@ -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() } } diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt index 6d0bb7395b..680ec17415 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt @@ -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()