From 9ac810e970719d46f56e43b53e5fa67f6eadeebc Mon Sep 17 00:00:00 2001 From: yostyle Date: Tue, 29 Oct 2024 14:32:36 +0100 Subject: [PATCH] Add error message when pro connect is not supported --- library/external/realmfieldnameshelper/build.gradle | 8 ++++++++ .../ui-strings/src/main/res/values-fr/strings_tchap.xml | 1 + library/ui-strings/src/main/res/values/strings_tchap.xml | 1 + .../features/onboarding/ftueauth/FtueAuthLoginFragment.kt | 7 ++++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/library/external/realmfieldnameshelper/build.gradle b/library/external/realmfieldnameshelper/build.gradle index 79e66702dd..3af9e766e5 100644 --- a/library/external/realmfieldnameshelper/build.gradle +++ b/library/external/realmfieldnameshelper/build.gradle @@ -1,9 +1,17 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + apply plugin: 'kotlin' apply plugin: 'java' sourceCompatibility = versions.sourceCompat targetCompatibility = versions.sourceCompat +kotlin { + compilerOptions { + jvmTarget = JvmTarget.JVM_17 + } +} + dependencies { implementation 'com.squareup:javapoet:1.13.0' } diff --git a/library/ui-strings/src/main/res/values-fr/strings_tchap.xml b/library/ui-strings/src/main/res/values-fr/strings_tchap.xml index df5dec1793..ae3a810171 100644 --- a/library/ui-strings/src/main/res/values-fr/strings_tchap.xml +++ b/library/ui-strings/src/main/res/values-fr/strings_tchap.xml @@ -8,6 +8,7 @@ Les mots de passe ne correspondent pas + %s est désactivé pour votre domaine Inviter par e\u2011mail diff --git a/library/ui-strings/src/main/res/values/strings_tchap.xml b/library/ui-strings/src/main/res/values/strings_tchap.xml index 2b9d1c49f8..bfe78c4d5d 100644 --- a/library/ui-strings/src/main/res/values/strings_tchap.xml +++ b/library/ui-strings/src/main/res/values/strings_tchap.xml @@ -8,6 +8,7 @@ Passwords don’t match + %s is disabled for your domain Send an invitation diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt index b3cf813101..2bd4d32199 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthLoginFragment.kt @@ -400,8 +400,13 @@ class FtueAuthLoginFragment : fun tryLoginSSO(state: OnboardingViewState) { if (state.signMode != SignMode.TchapSignInWithSSO) return - if (views.loginSocialLoginButtons.ssoIdentityProviders.isNullOrEmpty()) return if (views.loginField.text.isNullOrEmpty()) return + if (state.selectedHomeserver.upstreamUrl.isNullOrEmpty()) return + if (views.loginSocialLoginButtons.ssoIdentityProviders.isNullOrEmpty()) { + views.loginFieldTil.error = getString(CommonStrings.tchap_auth_sso_inactive, TCHAP_SSO_PROVIDER) + viewModel.handle(OnboardingAction.ResetHomeServerUrl) + return + } views.loginSocialLoginButtons.ssoIdentityProviders?.first().let { viewModel.fetchSsoUrl(