Exclude instruction from try catch block
This commit is contained in:
parent
b8d01c4577
commit
1ac17b3aee
|
@ -161,25 +161,22 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
|||
lifecycleScope.launch {
|
||||
try {
|
||||
session.signOut(!args.isUserLoggedOut)
|
||||
} catch (failure: Throwable) {
|
||||
displayError(failure)
|
||||
return@launch
|
||||
}
|
||||
Timber.w("SIGN_OUT: success, start app")
|
||||
sessionHolder.clearActiveSession()
|
||||
doLocalCleanup(clearPreferences = true)
|
||||
startNextActivityAndFinish()
|
||||
} catch (failure: Throwable) {
|
||||
displayError(failure)
|
||||
}
|
||||
}
|
||||
}
|
||||
args.clearCache -> {
|
||||
lifecycleScope.launch {
|
||||
try {
|
||||
session.clearCache()
|
||||
doLocalCleanup(clearPreferences = false)
|
||||
session.startSyncing(applicationContext)
|
||||
startNextActivityAndFinish()
|
||||
} catch (failure: Throwable) {
|
||||
displayError(failure)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue