mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-27 15:28:18 +08:00
Fix lint errors
This commit is contained in:
parent
efe9832444
commit
ec4ed88ee3
@ -43,6 +43,6 @@ internal const val SSO_UIA_FALLBACK_PATH = "/_matrix/client/r0/auth/m.login.sso/
|
||||
* See https://github.com/matrix-org/matrix-spec-proposals/pull/3824
|
||||
*/
|
||||
enum class SSOAction {
|
||||
login,
|
||||
register;
|
||||
LOGIN,
|
||||
REGISTER;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ abstract class AbstractSSOLoginFragment<VB : ViewBinding> : AbstractLoginFragmen
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = null,
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { prefetchUrl(it) }
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ open class LoginActivity : VectorBaseActivity<ActivityLoginBinding>(), UnlockedA
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = null,
|
||||
action = SSOAction.login
|
||||
action = SSOAction.LOGIN
|
||||
)?.let { ssoUrl ->
|
||||
openUrlInChromeCustomTab(this, null, ssoUrl)
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = provider?.id,
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class LoginSignUpSignInSelectionFragment @Inject constructor() : AbstractSSOLogi
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = provider?.id,
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
@ -115,7 +115,7 @@ class LoginSignUpSignInSelectionFragment @Inject constructor() : AbstractSSOLogi
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = null,
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
} else {
|
||||
|
@ -95,7 +95,7 @@ abstract class AbstractSSOLoginFragment2<VB : ViewBinding> : AbstractLoginFragme
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = null,
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { prefetchUrl(it) }
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ class LoginFragmentSignupUsername2 @Inject constructor() : AbstractSSOLoginFragm
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = provider?.id,
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class LoginFragmentToAny2 @Inject constructor() : AbstractSSOLoginFragment2<Frag
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = provider?.id,
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ class LoginSsoOnlyFragment2 @Inject constructor() : AbstractSSOLoginFragment2<Fr
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
providerId = null,
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode2.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ abstract class AbstractSSOFtueAuthFragment<VB : ViewBinding> : AbstractFtueAuthF
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
provider = null,
|
||||
action = if (state.onboardingFlow == OnboardingFlow.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.onboardingFlow == OnboardingFlow.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { prefetchUrl(it) }
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ class FtueAuthCombinedLoginFragment @Inject constructor(
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = deviceId,
|
||||
provider = id,
|
||||
action = SSOAction.login
|
||||
action = SSOAction.LOGIN
|
||||
)?.let { openInCustomTab(it) }
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ class FtueAuthCombinedRegisterFragment @Inject constructor() : AbstractSSOFtueAu
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = deviceId,
|
||||
provider = provider,
|
||||
action = SSOAction.register
|
||||
action = SSOAction.REGISTER
|
||||
)?.let { openInCustomTab(it) }
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ class FtueAuthLoginFragment @Inject constructor() : AbstractSSOFtueAuthFragment<
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
provider = provider,
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ class FtueAuthSignUpSignInSelectionFragment @Inject constructor() : AbstractSSOF
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
provider = provider,
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.signMode == SignMode.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
}
|
||||
@ -131,7 +131,7 @@ class FtueAuthSignUpSignInSelectionFragment @Inject constructor() : AbstractSSOF
|
||||
redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,
|
||||
deviceId = state.deviceId,
|
||||
provider = null,
|
||||
action = if (state.onboardingFlow == OnboardingFlow.SignUp) SSOAction.register else SSOAction.login
|
||||
action = if (state.onboardingFlow == OnboardingFlow.SignUp) SSOAction.REGISTER else SSOAction.LOGIN
|
||||
)
|
||||
?.let { openInCustomTab(it) }
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user