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 e6c5abe20c..fd032c1d35 100644 --- a/vector/src/main/java/im/vector/app/features/MainActivity.kt +++ b/vector/src/main/java/im/vector/app/features/MainActivity.kt @@ -161,25 +161,22 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity lifecycleScope.launch { try { session.signOut(!args.isUserLoggedOut) - Timber.w("SIGN_OUT: success, start app") - sessionHolder.clearActiveSession() - doLocalCleanup(clearPreferences = true) - startNextActivityAndFinish() } catch (failure: Throwable) { displayError(failure) + return@launch } + Timber.w("SIGN_OUT: success, start app") + sessionHolder.clearActiveSession() + doLocalCleanup(clearPreferences = true) + startNextActivityAndFinish() } } args.clearCache -> { lifecycleScope.launch { - try { - session.clearCache() - doLocalCleanup(clearPreferences = false) - session.startSyncing(applicationContext) - startNextActivityAndFinish() - } catch (failure: Throwable) { - displayError(failure) - } + session.clearCache() + doLocalCleanup(clearPreferences = false) + session.startSyncing(applicationContext) + startNextActivityAndFinish() } } }