Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/gradle/hilt-2.51.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine authored Apr 12, 2024
2 parents 08ae1f5 + 0d56a7b commit f53ca94
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 13 deletions.
2 changes: 1 addition & 1 deletion AR-builder.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pipeline {
string(name: 'SOURCE_BRANCH', description: 'Branch or PR name to')
string(name: 'CHANGE_BRANCH', description: 'Change branch name to build only used to checkout the correct branch if you need the branch name use SOURCE_BRANCH')
choice(name: 'BUILD_TYPE', choices: ['Compatrelease', 'Debug', 'Release', 'Compat'], description: 'Build Type for the Client')
choice(name: 'FLAVOR', choices: ['Prod', 'Dev', 'Staging', 'Internal', 'Beta'], description: 'Product Flavor to build')
choice(name: 'FLAVOR', choices: ['Prod', 'Fdroid', 'Dev', 'Staging', 'Internal', 'Beta'], description: 'Product Flavor to build')
booleanParam(name: 'UPLOAD_TO_S3', defaultValue: false, description: 'Boolean Flag to define if the build should be uploaded to S3')
booleanParam(name: 'UPLOAD_TO_PLAYSTORE_ENABLED', defaultValue: false, description: 'Boolean Flag to define if the build should be uploaded to Playstore')
booleanParam(name: 'RUN_UNIT_TEST', defaultValue: true, description: 'Boolean Flag to define if the unit tests should be run')
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ List<String> defineFlavor() {
} else if (branchName == "develop") {
return ['Staging', 'Dev']
} else if (branchName == "prod") {
return ['Prod']
return ['Prod', 'Fdroid']
} else if (branchName == "internal") {
return ['Internal']
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import com.wire.android.ui.common.topappbar.WireCenterAlignedTopAppBar
import com.wire.android.ui.common.visbility.rememberVisibilityState
import com.wire.android.ui.destinations.E2eiCertificateDetailsScreenDestination
import com.wire.android.ui.destinations.InitialSyncScreenDestination
import com.wire.android.ui.home.E2EIErrorNoSnoozeDialog
import com.wire.android.ui.home.E2EIEnrollmentErrorWithDismissDialog
import com.wire.android.ui.home.E2EISuccessDialog
import com.wire.android.ui.markdown.MarkdownConstants
import com.wire.android.ui.theme.WireTheme
Expand Down Expand Up @@ -190,12 +190,10 @@ private fun E2EIEnrollmentScreenContent(
}

if (state.isCertificateEnrollError) {
E2EIErrorNoSnoozeDialog(
E2EIEnrollmentErrorWithDismissDialog(
isE2EILoading = state.isLoading,
updateCertificate = {
dismissErrorDialog()
enrollE2EICertificate()
}
onClick = enrollE2EICertificate,
onDismiss = dismissErrorDialog
)
}

Expand Down
38 changes: 35 additions & 3 deletions app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,46 @@ fun E2EISuccessDialog(
}

@Composable
fun E2EIErrorWithDismissDialog(
fun E2EIUpdateErrorWithDismissDialog(
isE2EILoading: Boolean,
updateCertificate: () -> Unit,
onDismiss: () -> Unit
) {
WireDialog(
E2EIErrorWithDismissDialog(
title = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_title),
text = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_text),
isE2EILoading = isE2EILoading,
updateCertificate = updateCertificate,
onDismiss = onDismiss
)
}

@Composable
fun E2EIEnrollmentErrorWithDismissDialog(
isE2EILoading: Boolean,
onClick: () -> Unit,
onDismiss: () -> Unit
) {
E2EIErrorWithDismissDialog(
title = stringResource(id = R.string.end_to_end_identity_enrollment_error_dialog_title),
text = stringResource(id = R.string.end_to_end_identity_enrollment_error_dialog_text),
isE2EILoading = isE2EILoading,
updateCertificate = onClick,
onDismiss = onDismiss
)
}

@Composable
private fun E2EIErrorWithDismissDialog(
title: String,
text: String,
isE2EILoading: Boolean,
updateCertificate: () -> Unit,
onDismiss: () -> Unit
) {
WireDialog(
title = title,
text = text,
onDismiss = onDismiss,
optionButton1Properties = WireDialogButtonProperties(
onClick = updateCertificate,
Expand Down Expand Up @@ -247,7 +279,7 @@ private fun E2EIErrorWithSnoozeDialog(
}

@Composable
fun E2EIErrorNoSnoozeDialog(
private fun E2EIErrorNoSnoozeDialog(
isE2EILoading: Boolean,
updateCertificate: () -> Unit
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ import com.wire.android.ui.common.topappbar.WireCenterAlignedTopAppBar
import com.wire.android.ui.common.topappbar.WireTopAppBarTitle
import com.wire.android.ui.destinations.E2eiCertificateDetailsScreenDestination
import com.wire.android.ui.e2eiEnrollment.GetE2EICertificateUI
import com.wire.android.ui.home.E2EIErrorWithDismissDialog
import com.wire.android.ui.home.E2EISuccessDialog
import com.wire.android.ui.home.E2EIUpdateErrorWithDismissDialog
import com.wire.android.ui.home.conversationslist.common.FolderHeader
import com.wire.android.ui.settings.devices.model.DeviceDetailsState
import com.wire.android.ui.theme.wireColorScheme
Expand Down Expand Up @@ -279,7 +279,7 @@ fun DeviceDetailsContent(
}

if (state.isE2EICertificateEnrollError) {
E2EIErrorWithDismissDialog(
E2EIUpdateErrorWithDismissDialog(
isE2EILoading = state.isLoadingCertificate,
updateCertificate = { enrollE2eiCertificate() },
onDismiss = onEnrollE2EIErrorDismiss
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,8 @@
<string name="end_to_end_identity_renew_success_dialog_title">Certificate updated</string>
<string name="end_to_end_identity_renew_success_dialog_text">The certificate is updated and your device is verified.</string>
<string name="end_to_end_identity_renew_success_dialog_second_button">Certificate Details</string>
<string name="end_to_end_identity_enrollment_error_dialog_title">Certificate couldn’t be issued.</string>
<string name="end_to_end_identity_enrollment_error_dialog_text">Please try again, or reach out to your team admin.</string>
<string name="end_to_end_identity_ceritifcate">Certificate Details</string>
<string name="end_to_end_identity_certificate_revoked_dialog_title">End-to-end certificate revoked</string>
<string name="end_to_end_identity_certificate_revoked_dialog_description">Log out to reduce security risks. Then log in again, get a new certificate, and reset your password.\n\nIf you keep using this device, your conversations are no longer verified.</string>
Expand Down

0 comments on commit f53ca94

Please sign in to comment.