~evilham/unchat-android

163f4cfaf261efd8419418cdadacf81dba08ff75 — Benoit Marty 3 years ago 9a8f45f
Ensure the Activity is destroyed, it seems that the intent flags are not enough now.
M vector/src/main/java/im/vector/app/features/MainActivity.kt => vector/src/main/java/im/vector/app/features/MainActivity.kt +4 -2
@@ 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()
        }
    }


M vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt => vector/src/main/java/im/vector/app/features/home/HomeActivityViewModel.kt +1 -1
@@ 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()