From 9a628c7b5dcd51f0e07190ffcf1c51554623d378 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 15 Nov 2019 14:53:02 +0100 Subject: [PATCH] ktlint --- .../android/api/auth/registration/RegistrationService.kt | 1 - .../android/api/auth/registration/RegistrationWizard.kt | 1 - .../im/vector/matrix/android/api/auth/registration/Stage.kt | 6 +----- .../java/im/vector/matrix/android/api/util/Cancelable.kt | 1 - .../matrix/android/internal/auth/DefaultAuthenticator.kt | 6 +++--- .../internal/auth/registration/DefaultRegistrationWizard.kt | 1 - .../auth/registration/LocalizedFlowDataLoginTerms.kt | 2 +- .../internal/auth/registration/RegistrationParams.kt | 2 +- .../riotx/features/login/LoginServerUrlFormFragment.kt | 1 - .../java/im/vector/riotx/features/login/LoginViewState.kt | 3 --- 10 files changed, 6 insertions(+), 18 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationService.kt index 7b131b922d..b314f92b9b 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationService.kt @@ -21,5 +21,4 @@ import im.vector.matrix.android.api.auth.data.HomeServerConnectionConfig interface RegistrationService { fun getOrCreateRegistrationWizard(homeServerConnectionConfig: HomeServerConnectionConfig): RegistrationWizard - } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationWizard.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationWizard.kt index 879bd5d74b..332c1ef781 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationWizard.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/RegistrationWizard.kt @@ -27,5 +27,4 @@ interface RegistrationWizard { fun performReCaptcha(response: String, callback: MatrixCallback): Cancelable // TODO Add other method here - } diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/Stage.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/Stage.kt index f302b953c2..283a79348b 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/Stage.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/auth/registration/Stage.kt @@ -18,7 +18,6 @@ package im.vector.matrix.android.api.auth.registration import im.vector.matrix.android.api.util.JsonDict - sealed class Stage(open val mandatory: Boolean) { // m.login.password @@ -45,7 +44,4 @@ sealed class Stage(open val mandatory: Boolean) { data class Other(override val mandatory: Boolean, val type: String, val params: JsonDict?) : Stage(mandatory) } - -class TermPolicies { - -} +class TermPolicies diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/util/Cancelable.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/util/Cancelable.kt index 7ec01cca10..8473f50796 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/util/Cancelable.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/api/util/Cancelable.kt @@ -30,5 +30,4 @@ interface Cancelable { } } - object NoOpCancellable : Cancelable diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticator.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticator.kt index 995ec0aedb..3a6a833dcd 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticator.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/DefaultAuthenticator.kt @@ -144,10 +144,10 @@ internal class DefaultAuthenticator @Inject constructor(@Unauthenticated private fun resetPasswordInternal(/*homeServerConnectionConfig: HomeServerConnectionConfig, email: String, newPassword: String*/) { // TODO error("Not implemented") - //val authAPI = buildAuthAPI(homeServerConnectionConfig) - //executeRequest { + // val authAPI = buildAuthAPI(homeServerConnectionConfig) + // executeRequest { // apiCall = authAPI.getLoginFlows() - //} + // } } private fun buildAuthAPI(homeServerConnectionConfig: HomeServerConnectionConfig): AuthAPI { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/DefaultRegistrationWizard.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/DefaultRegistrationWizard.kt index cda3240cb1..f37f2b97be 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/DefaultRegistrationWizard.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/DefaultRegistrationWizard.kt @@ -72,7 +72,6 @@ internal class DefaultRegistrationWizard(private val homeServerConnectionConfig: ), callback) } - private fun performRegistrationRequest(registrationParams: RegistrationParams, callback: MatrixCallback): Cancelable { val job = GlobalScope.launch(coroutineDispatchers.main) { val result = runCatching { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/LocalizedFlowDataLoginTerms.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/LocalizedFlowDataLoginTerms.kt index dd125e3c74..2cd52f702e 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/LocalizedFlowDataLoginTerms.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/LocalizedFlowDataLoginTerms.kt @@ -28,4 +28,4 @@ data class LocalizedFlowDataLoginTerms( var version: String? = null, var localizedUrl: String? = null, var localizedName: String? = null -) : Parcelable \ No newline at end of file +) : Parcelable diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/RegistrationParams.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/RegistrationParams.kt index db8475e06c..8d668f7f11 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/RegistrationParams.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/registration/RegistrationParams.kt @@ -44,4 +44,4 @@ data class RegistrationParams( // Temporary flag to notify the server that we support msisdn flow. Used to prevent old app // versions to end up in fallback because the HS returns the msisdn flow which they don't support val x_show_msisdn: Boolean? = null -) \ No newline at end of file +) diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt index e4dd5ad7e2..e53159da70 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginServerUrlFormFragment.kt @@ -115,7 +115,6 @@ class LoginServerUrlFormFragment @Inject constructor( if (serverUrl.startsWith("http").not()) { serverUrl = "https://$serverUrl" loginServerUrlFormHomeServerUrl.setText(serverUrl) - } loginViewModel.handle(LoginAction.UpdateHomeServer(serverUrl)) } diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt index 5ecfd7fad6..1f01e2348d 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginViewState.kt @@ -16,7 +16,6 @@ package im.vector.riotx.features.login - import com.airbnb.mvrx.* data class LoginViewState( @@ -25,7 +24,6 @@ data class LoginViewState( val asyncResetPassword: Async = Uninitialized ) : MvRxState { - fun isLoading(): Boolean { // TODO Add other async here return asyncLoginAction is Loading @@ -38,4 +36,3 @@ data class LoginViewState( return asyncLoginAction is Success } } -