mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-23 22:56:23 -06:00
Fix login in symbol view (#493)
This commit is contained in:
parent
81ce328abd
commit
f5f11d5130
@ -28,5 +28,6 @@ class LoginErrorHandler @Inject constructor(
|
||||
override fun clear() {
|
||||
super.clear()
|
||||
onBadCredentials = {}
|
||||
onStudentDuplicate = {}
|
||||
}
|
||||
}
|
||||
|
@ -38,8 +38,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
||||
|
||||
override val formPassValue get() = loginFormPass.text.toString()
|
||||
|
||||
override val formHostValue
|
||||
get() = hostValues.getOrNull(hostKeys.indexOf(loginFormHost.text.toString()))
|
||||
override val formHostValue get() = hostValues[(hostKeys.indexOf(loginFormHost.text.toString()))]
|
||||
|
||||
private lateinit var hostKeys: Array<String>
|
||||
|
||||
@ -152,7 +151,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
||||
Triple(
|
||||
loginFormName.text.toString(),
|
||||
loginFormPass.text.toString(),
|
||||
resources.getStringArray(R.array.endpoints_values)[1]
|
||||
formHostValue
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ class LoginFormPresenter @Inject constructor(
|
||||
view?.apply {
|
||||
clearPassError()
|
||||
clearNameError()
|
||||
if (formHostValue?.contains("fakelog") == true) setCredentials("jan@fakelog.cf", "jan123")
|
||||
if (formHostValue.contains("fakelog")) setCredentials("jan@fakelog.cf", "jan123")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ interface LoginFormView : BaseView {
|
||||
|
||||
val formPassValue: String
|
||||
|
||||
val formHostValue: String?
|
||||
val formHostValue: String
|
||||
|
||||
fun setCredentials(name: String, pass: String)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user