refactor: Remove slow login check. Closes #135.
This commit is contained in:
parent
629ca01d99
commit
00eb3333fe
@ -57,29 +57,7 @@ class LoginActivity : AppCompatActivity(), DIAware {
|
||||
|
||||
if (appSettingsService.getBaseUrl().isNotEmpty()) {
|
||||
showProgress(true)
|
||||
// This should be reverted when "old" users connected with a non-selfoss rss
|
||||
// are handled. Revert to "simple" way.
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
try {
|
||||
val (errorFetching, displaySelfossOnly) = repository.shouldBeSelfossInstance()
|
||||
if (!errorFetching && !displaySelfossOnly) {
|
||||
goToMain()
|
||||
} else {
|
||||
showProgress(false)
|
||||
if (displaySelfossOnly) {
|
||||
Toast.makeText(
|
||||
applicationContext,
|
||||
R.string.application_selfoss_only,
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
repository.logout()
|
||||
}
|
||||
} catch (e: Throwable) {
|
||||
repository.logout()
|
||||
showProgress(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleActions()
|
||||
|
Loading…
Reference in New Issue
Block a user