setup guide shows what usage notes send

This commit is contained in:
Seb3thehacker committed 2026-10-05 17:44:42 -07:00
1 parent 10cc17bb66
commit 3ac815eee4
2 files changed
+5 -7

No files matched your search

@@ -93,7 +93,7 @@ fun SettingsScreen(
ConnectionSection() ConnectionSection()
if (SHOW_RECOMMENDED_APPS) AppsSection(onOpenRecommendedApps) if (SHOW_RECOMMENDED_APPS) AppsSection(onOpenRecommendedApps)
CertificateSection() CertificateSection()
SettingsSection("Usage notes", header = USAGE_STATS_INTRO) { UsageStatsRows(showNote = true) } SettingsSection("Usage notes", header = USAGE_STATS_INTRO) { UsageStatsRows() }
Spacer(Modifier.height(16.dp)) Spacer(Modifier.height(16.dp))
} }
} }
@@ -60,18 +60,18 @@ internal val USAGE_STATS_INTRO: AnnotatedString = buildAnnotatedString {
append(INTRO_END) append(INTRO_END)
} }
/** The usage notes card for the setup guide: the same rows Settings shows, minus the note. */ /** The usage notes card for the setup guide: the same rows Settings shows. */
@Composable @Composable
internal fun UsageStatsChoices(modifier: Modifier = Modifier) { internal fun UsageStatsChoices(modifier: Modifier = Modifier) {
SettingsCard(modifier) { UsageStatsRows(showNote = false) } SettingsCard(modifier) { UsageStatsRows() }
} }
/** /**
* The on switch, what to share, and (with [showNote]) the note itself, saved as they change. * The on switch, what to share, and the note itself, saved as they change.
* Rows only: the caller puts them in a card. * Rows only: the caller puts them in a card.
*/ */
@Composable @Composable
internal fun ColumnScope.UsageStatsRows(showNote: Boolean) { internal fun ColumnScope.UsageStatsRows() {
val context = LocalContext.current val context = LocalContext.current
var on by remember { mutableStateOf(UsageStats.enabled(context)) } var on by remember { mutableStateOf(UsageStats.enabled(context)) }
var choices by remember { mutableStateOf(UsageStats.choices(context)) } var choices by remember { mutableStateOf(UsageStats.choices(context)) }
@@ -106,7 +106,6 @@ internal fun ColumnScope.UsageStatsRows(showNote: Boolean) {
choices = choices.copy(cars = it) choices = choices.copy(cars = it)
save() save()
} }
if (showNote) {
SettingsDivider() SettingsDivider()
SettingsRow( SettingsRow(
"What gets sent", "What gets sent",
@@ -139,7 +138,6 @@ internal fun ColumnScope.UsageStatsRows(showNote: Boolean) {
} }
} }
} }
}
} }
/** A share choice: the label lines up with the rows' titles, the checkbox sits at the end. */ /** A share choice: the label lines up with the rows' titles, the checkbox sits at the end. */