1
0
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:
Rafał Borcz 2019-09-10 12:25:08 +02:00 committed by Mikołaj Pich
parent 81ce328abd
commit f5f11d5130
4 changed files with 5 additions and 5 deletions

View File

@ -28,5 +28,6 @@ class LoginErrorHandler @Inject constructor(
override fun clear() {
super.clear()
onBadCredentials = {}
onStudentDuplicate = {}
}
}

View File

@ -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
))
}

View File

@ -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")
}
}

View File

@ -11,7 +11,7 @@ interface LoginFormView : BaseView {
val formPassValue: String
val formHostValue: String?
val formHostValue: String
fun setCredentials(name: String, pass: String)