forked from github/wulkanowy-mirror
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() {
|
override fun clear() {
|
||||||
super.clear()
|
super.clear()
|
||||||
onBadCredentials = {}
|
onBadCredentials = {}
|
||||||
|
onStudentDuplicate = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
|||||||
|
|
||||||
override val formPassValue get() = loginFormPass.text.toString()
|
override val formPassValue get() = loginFormPass.text.toString()
|
||||||
|
|
||||||
override val formHostValue
|
override val formHostValue get() = hostValues[(hostKeys.indexOf(loginFormHost.text.toString()))]
|
||||||
get() = hostValues.getOrNull(hostKeys.indexOf(loginFormHost.text.toString()))
|
|
||||||
|
|
||||||
private lateinit var hostKeys: Array<String>
|
private lateinit var hostKeys: Array<String>
|
||||||
|
|
||||||
@ -152,7 +151,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
|
|||||||
Triple(
|
Triple(
|
||||||
loginFormName.text.toString(),
|
loginFormName.text.toString(),
|
||||||
loginFormPass.text.toString(),
|
loginFormPass.text.toString(),
|
||||||
resources.getStringArray(R.array.endpoints_values)[1]
|
formHostValue
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class LoginFormPresenter @Inject constructor(
|
|||||||
view?.apply {
|
view?.apply {
|
||||||
clearPassError()
|
clearPassError()
|
||||||
clearNameError()
|
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 formPassValue: String
|
||||||
|
|
||||||
val formHostValue: String?
|
val formHostValue: String
|
||||||
|
|
||||||
fun setCredentials(name: String, pass: String)
|
fun setCredentials(name: String, pass: String)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user