refactor: Remove slow login check. Closes #135.

This commit is contained in:
aminecmi 2023-03-25 20:28:30 +01:00
parent 629ca01d99
commit 00eb3333fe

View File

@ -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)
}
}
goToMain()
}
handleActions()