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 {
|
lifecycleScope.launch {
|
||||||
try {
|
try {
|
||||||
session.signOut(!args.isUserLoggedOut)
|
session.signOut(!args.isUserLoggedOut)
|
||||||
Timber.w("SIGN_OUT: success, start app")
|
|
||||||
sessionHolder.clearActiveSession()
|
|
||||||
doLocalCleanup(clearPreferences = true)
|
|
||||||
startNextActivityAndFinish()
|
|
||||||
} catch (failure: Throwable) {
|
} catch (failure: Throwable) {
|
||||||
displayError(failure)
|
displayError(failure)
|
||||||
|
return@launch
|
||||||
}
|
}
|
||||||
|
Timber.w("SIGN_OUT: success, start app")
|
||||||
|
sessionHolder.clearActiveSession()
|
||||||
|
doLocalCleanup(clearPreferences = true)
|
||||||
|
startNextActivityAndFinish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
args.clearCache -> {
|
args.clearCache -> {
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
try {
|
session.clearCache()
|
||||||
session.clearCache()
|
doLocalCleanup(clearPreferences = false)
|
||||||
doLocalCleanup(clearPreferences = false)
|
session.startSyncing(applicationContext)
|
||||||
session.startSyncing(applicationContext)
|
startNextActivityAndFinish()
|
||||||
startNextActivityAndFinish()
|
|
||||||
} catch (failure: Throwable) {
|
|
||||||
displayError(failure)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue