diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt index 24061270c..7e65bb879 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/SourceLoginDialog.kt @@ -46,7 +46,7 @@ class SourceLoginDialog : LoginDialogPreference() { requestSubscription?.unsubscribe() v?.apply { - if (username.text.length == 0 || password.text.length == 0) + if (username.text.isEmpty() || password.text.isEmpty()) return login.progress = 1 @@ -69,6 +69,7 @@ class SourceLoginDialog : LoginDialogPreference() { }, { error -> login.progress = -1 login.setText(R.string.unknown_error) + error.message?.let { context.toast(it) } }) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt index fb6354dc8..58da50ff2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/widget/preference/TrackLoginDialog.kt @@ -45,7 +45,7 @@ class TrackLoginDialog : LoginDialogPreference() { requestSubscription?.unsubscribe() v?.apply { - if (username.text.length == 0 || password.text.length == 0) + if (username.text.isEmpty() || password.text.isEmpty()) return login.progress = 1 @@ -61,6 +61,7 @@ class TrackLoginDialog : LoginDialogPreference() { }, { error -> login.progress = -1 login.setText(R.string.unknown_error) + error.message?.let { context.toast(it) } }) }