Fix lint errors

This commit is contained in:
Hugh Nimmo-Smith 2022-08-14 19:25:24 +01:00
parent efe9832444
commit ec4ed88ee3
14 changed files with 17 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {