Show login errors
This commit is contained in:
parent
82f4e3157a
commit
2b63bae989
@ -46,7 +46,7 @@ class SourceLoginDialog : LoginDialogPreference() {
|
|||||||
requestSubscription?.unsubscribe()
|
requestSubscription?.unsubscribe()
|
||||||
|
|
||||||
v?.apply {
|
v?.apply {
|
||||||
if (username.text.length == 0 || password.text.length == 0)
|
if (username.text.isEmpty() || password.text.isEmpty())
|
||||||
return
|
return
|
||||||
|
|
||||||
login.progress = 1
|
login.progress = 1
|
||||||
@ -69,6 +69,7 @@ class SourceLoginDialog : LoginDialogPreference() {
|
|||||||
}, { error ->
|
}, { error ->
|
||||||
login.progress = -1
|
login.progress = -1
|
||||||
login.setText(R.string.unknown_error)
|
login.setText(R.string.unknown_error)
|
||||||
|
error.message?.let { context.toast(it) }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ class TrackLoginDialog : LoginDialogPreference() {
|
|||||||
requestSubscription?.unsubscribe()
|
requestSubscription?.unsubscribe()
|
||||||
|
|
||||||
v?.apply {
|
v?.apply {
|
||||||
if (username.text.length == 0 || password.text.length == 0)
|
if (username.text.isEmpty() || password.text.isEmpty())
|
||||||
return
|
return
|
||||||
|
|
||||||
login.progress = 1
|
login.progress = 1
|
||||||
@ -61,6 +61,7 @@ class TrackLoginDialog : LoginDialogPreference() {
|
|||||||
}, { error ->
|
}, { error ->
|
||||||
login.progress = -1
|
login.progress = -1
|
||||||
login.setText(R.string.unknown_error)
|
login.setText(R.string.unknown_error)
|
||||||
|
error.message?.let { context.toast(it) }
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user