feat(settings): reorder the Advanced settings section

Reorder the Advanced block's SwitchRows to Push Mail, Load Remote
Images, Encrypt Local Cache, Require Screen Lock, then Allow insecure
STARTTLS fallback (moved last). Relocate the Background battery usage
row out of Advanced entirely and into the main settings list, directly
above local retention ("Storage on this device"), since it's common
enough (OEM battery optimization delaying push mail) that it shouldn't
be hidden behind "Advanced". Pure composable placement — no string
changes, no behavior change to any toggle.

Closes #162

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 17:46:59 -05:00
co-authored by Claude Opus 4.8
parent 97d6f9303b
commit 30c5251a68
@@ -203,6 +203,22 @@ fun SettingsScreen(
)
HorizontalDivider()
// Background battery usage (#162): relocated out of the collapsible Advanced section and
// into the main list, directly above local retention — OEM battery optimization delaying
// push mail is common enough that it shouldn't be hidden behind "Advanced".
ClickRow(
title = stringResource(R.string.settings_adv_battery),
subtitle = stringResource(
if (batteryUnrestricted) {
R.string.settings_adv_battery_unrestricted
} else {
R.string.settings_adv_battery_optimized
},
),
onClick = { runCatching { context.startActivity(viewModel.batterySettingsIntent()) } },
)
HorizontalDivider()
// Global device-only retention default (issue #13); accounts may override it.
RetentionSection(
count = settings.retentionCount,
@@ -230,23 +246,6 @@ fun SettingsScreen(
checked = settings.pushIdle,
onCheckedChange = viewModel::setPushIdle,
)
ClickRow(
title = stringResource(R.string.settings_adv_battery),
subtitle = stringResource(
if (batteryUnrestricted) {
R.string.settings_adv_battery_unrestricted
} else {
R.string.settings_adv_battery_optimized
},
),
onClick = { runCatching { context.startActivity(viewModel.batterySettingsIntent()) } },
)
SwitchRow(
title = stringResource(R.string.settings_adv_starttls),
checked = settings.allowStartTls,
onCheckedChange = viewModel::setAllowStartTls,
subtitle = stringResource(R.string.settings_adv_starttls_summary),
)
SwitchRow(
title = stringResource(R.string.settings_adv_remote_images),
checked = settings.loadRemoteImages,
@@ -264,6 +263,12 @@ fun SettingsScreen(
onCheckedChange = viewModel::setAppLock,
subtitle = stringResource(R.string.settings_adv_app_lock_summary),
)
SwitchRow(
title = stringResource(R.string.settings_adv_starttls),
checked = settings.allowStartTls,
onCheckedChange = viewModel::setAllowStartTls,
subtitle = stringResource(R.string.settings_adv_starttls_summary),
)
}
}
}