After deselecting fakelog, clear credentials from login form (#1713)

This commit is contained in:
Michael 2021-12-12 15:04:31 +01:00 committed by GitHub
parent c87085a226
commit 45e884127f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import io.github.wulkanowy.ui.modules.main.MainActivity
import javax.inject.Singleton
import javax.inject.Inject
@Suppress("UNUSED_PARAMETER", "unused")
@Singleton
class InAppReviewHelper @Inject constructor(
@ApplicationContext private val context: Context

View File

@ -52,6 +52,8 @@ class LoginFormPresenter @Inject constructor(
clearHostError()
if (formHostValue.contains("fakelog")) {
setCredentials("jan@fakelog.cf", "jan123")
} else if (formUsernameValue == "jan@fakelog.cf" && formPassValue == "jan123") {
setCredentials("", "")
}
updateUsernameLabel()
}