mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 03:48:37 +03:00
Tests sso login mode
This commit is contained in:
parent
448e8e001f
commit
12dc8a8112
1 changed files with 8 additions and 0 deletions
|
@ -34,6 +34,7 @@ import im.vector.app.features.signout.soft.epoxy.loginRedButtonItem
|
||||||
import im.vector.app.features.signout.soft.epoxy.loginTextItem
|
import im.vector.app.features.signout.soft.epoxy.loginTextItem
|
||||||
import im.vector.app.features.signout.soft.epoxy.loginTitleItem
|
import im.vector.app.features.signout.soft.epoxy.loginTitleItem
|
||||||
import im.vector.app.features.signout.soft.epoxy.loginTitleSmallItem
|
import im.vector.app.features.signout.soft.epoxy.loginTitleSmallItem
|
||||||
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class SoftLogoutController @Inject constructor(
|
class SoftLogoutController @Inject constructor(
|
||||||
|
@ -102,6 +103,8 @@ class SoftLogoutController @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is Success -> {
|
is Success -> {
|
||||||
|
val loginMode = state.asyncHomeServerLoginFlowRequest.invoke()
|
||||||
|
Timber.i("Login Mode: $loginMode")
|
||||||
when (state.asyncHomeServerLoginFlowRequest.invoke()) {
|
when (state.asyncHomeServerLoginFlowRequest.invoke()) {
|
||||||
LoginMode.Password -> {
|
LoginMode.Password -> {
|
||||||
loginPasswordFormItem {
|
loginPasswordFormItem {
|
||||||
|
@ -123,6 +126,11 @@ class SoftLogoutController @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is LoginMode.SsoAndPassword -> {
|
is LoginMode.SsoAndPassword -> {
|
||||||
|
loginCenterButtonItem {
|
||||||
|
id("sso")
|
||||||
|
text(host.stringProvider.getString(R.string.login_signin_sso))
|
||||||
|
listener { host.listener?.signinFallbackSubmit() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LoginMode.Unsupported -> {
|
LoginMode.Unsupported -> {
|
||||||
loginCenterButtonItem {
|
loginCenterButtonItem {
|
||||||
|
|
Loading…
Reference in a new issue