From 1808cc875d770268ca08a2743a1d49525243f978 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 11:29:49 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20show=20hide=20analytics=20toggle=20(WP?= =?UTF-8?q?B-10587)=20=F0=9F=8D=92=20(#3325)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: alexandreferris Co-authored-by: Alexandre Ferris --- .../settings/privacy/PrivacySettingsScreen.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/settings/privacy/PrivacySettingsScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/settings/privacy/PrivacySettingsScreen.kt index 1768c8bb9bc..b36d2d49f38 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/settings/privacy/PrivacySettingsScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/settings/privacy/PrivacySettingsScreen.kt @@ -26,6 +26,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.hilt.navigation.compose.hiltViewModel import com.ramcosta.composedestinations.annotation.RootNavGraph +import com.wire.android.BuildConfig import com.wire.android.R import com.wire.android.navigation.Navigator import com.wire.android.ui.common.colorsScheme @@ -90,12 +91,14 @@ fun PrivacySettingsScreenContent( .fillMaxSize() .padding(internalPadding) ) { - GroupConversationOptionsItem( - title = stringResource(id = R.string.settings_send_anonymous_usage_data_title), - switchState = SwitchState.Enabled(value = isAnonymousUsageDataEnabled, onCheckedChange = setAnonymousUsageDataEnabled), - arrowType = ArrowType.NONE, - subtitle = stringResource(id = R.string.settings_send_anonymous_usage_data_description) - ) + if (BuildConfig.ANALYTICS_ENABLED) { + GroupConversationOptionsItem( + title = stringResource(id = R.string.settings_send_anonymous_usage_data_title), + switchState = SwitchState.Enabled(value = isAnonymousUsageDataEnabled, onCheckedChange = setAnonymousUsageDataEnabled), + arrowType = ArrowType.NONE, + subtitle = stringResource(id = R.string.settings_send_anonymous_usage_data_description) + ) + } WireDivider(color = colorsScheme().outlineVariant) GroupConversationOptionsItem( title = stringResource(R.string.settings_send_read_receipts),