Skip to content

Commit

Permalink
Add error message when pro connect is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
yostyle committed Oct 29, 2024
1 parent de5cbd7 commit 9ac810e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions library/external/realmfieldnameshelper/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<!-- Register -->
<string name="tchap_auth_password_dont_match">Les mots de passe ne correspondent pas</string>
<string name="tchap_auth_sso_inactive">%s est désactivé pour votre domaine</string>

<!-- Invitation -->
<string name="tchap_people_search_invite_by_id_dialog_title">Inviter par e\u2011mail</string>
Expand Down
1 change: 1 addition & 0 deletions library/ui-strings/src/main/res/values/strings_tchap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<!-- Register -->
<string name="tchap_auth_password_dont_match">Passwords don’t match</string>
<string name="tchap_auth_sso_inactive">%s is disabled for your domain</string>

<!-- Invitation -->
<string name="tchap_people_search_invite_by_id_dialog_title">Send an invitation</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9ac810e

Please sign in to comment.