From 7b1a6d768aff11c46c09f5f5189d880421315bc0 Mon Sep 17 00:00:00 2001 From: k1rill Date: Mon, 12 Feb 2024 10:09:26 +0300 Subject: [PATCH] fix: added different resources for sign up --- .../auth/presentation/ui/SocialAuthView.kt | 19 +++++++++++++++++-- auth/src/main/res/values/strings.xml | 3 +++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt b/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt index b821e5709..51b4804f9 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/ui/SocialAuthView.kt @@ -35,6 +35,11 @@ internal fun SocialAuthView( ) { Column(modifier = modifier) { if (isGoogleAuthEnabled) { + val stringRes = if (isSignIn) { + R.string.auth_google + } else { + R.string.auth_continue_google + } OpenEdXOutlinedButton( modifier = Modifier .testTag("btn_google_auth") @@ -57,12 +62,17 @@ internal fun SocialAuthView( modifier = Modifier .testTag("txt_google_auth") .padding(start = 10.dp), - text = stringResource(id = R.string.auth_google) + text = stringResource(id = stringRes) ) } } } if (isFacebookAuthEnabled) { + val stringRes = if (isSignIn) { + R.string.auth_facebook + } else { + R.string.auth_continue_facebook + } OpenEdXButton( width = Modifier .testTag("btn_facebook_auth") @@ -85,12 +95,17 @@ internal fun SocialAuthView( .testTag("txt_facebook_auth") .padding(start = 10.dp), color = MaterialTheme.appColors.buttonText, - text = stringResource(id = R.string.auth_facebook) + text = stringResource(id = stringRes) ) } } } if (isMicrosoftAuthEnabled) { + val stringRes = if (isSignIn) { + R.string.auth_microsoft + } else { + R.string.auth_continue_microsoft + } OpenEdXButton( width = Modifier .testTag("btn_microsoft_auth") diff --git a/auth/src/main/res/values/strings.xml b/auth/src/main/res/values/strings.xml index 67f6f6a2b..85eb3a47f 100644 --- a/auth/src/main/res/values/strings.xml +++ b/auth/src/main/res/values/strings.xml @@ -28,6 +28,9 @@ Sign in with Google Sign in with Facebook Sign in with Microsoft + Continue with Google + Continue with Facebook + Continue with Microsoft You\'ve successfully signed in with %s. We just need a little more information before you start learning with %s.