Fix Kitsu toasting "Logged in" when there is an error (#4329)

This commit is contained in:
Andreas
2021-01-22 00:05:22 +01:00
committed by GitHub
parent 837d8f5f30
commit 2a5102a457
2 changed files with 5 additions and 8 deletions

View File

@@ -48,6 +48,7 @@ class TrackLoginDialog(
dialog?.dismiss()
withUIContext { view?.context?.toast(R.string.login_success) }
} catch (e: Throwable) {
service.logout()
binding?.login?.progress = -1
binding?.login?.setText(R.string.unknown_error)
withUIContext { e.message?.let { view?.context?.toast(it) } }