feat(#553): Disable (not Hide) clears all experimental toggles

Hiding the section left enabled features running invisibly. The action is now
'Disable experimental features': disableExperimental() turns off every
experimental flag (CoreScope observer counts, future ones) AND re-locks the
section in one atomic write. Also fixes the subtitle to say 'Build row' (the
#553 anchor), not 'version row'. Part of the #509/#553 experimental section.

Agent: QuietSnow (session 31eaba02)
pull/556/head
Strycher 2 months ago
parent aaa33c983d
commit fb649e746d

@ -221,8 +221,8 @@
"settings_coreScopeObserverCount": "CoreScope observer counts",
"settings_coreScopeObserverCountSubtitle": "On outgoing channel messages, show how many CoreScope observers heard the packet, alongside radio-heard repeats. Needs internet.",
"settings_coreScopeObserverCountUnsupported": "Requires a firmware build with packet-hash support (v22+).",
"settings_experimentalHide": "Hide Experimental section",
"settings_experimentalHideSubtitle": "Unlock again anytime with 7 taps on the version row.",
"settings_experimentalDisable": "Disable experimental features",
"settings_experimentalDisableSubtitle": "Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.",
"settings_experimentalUnlocked": "Experimental features unlocked",
"settings_experimentalAlreadyUnlocked": "Experimental features are already unlocked",
"settings_experimentalCountdown": "{count} more taps to unlock experimental features",

@ -1126,17 +1126,17 @@ abstract class AppLocalizations {
/// **'Requires a firmware build with packet-hash support (v22+).'**
String get settings_coreScopeObserverCountUnsupported;
/// No description provided for @settings_experimentalHide.
/// No description provided for @settings_experimentalDisable.
///
/// In en, this message translates to:
/// **'Hide Experimental section'**
String get settings_experimentalHide;
/// **'Disable experimental features'**
String get settings_experimentalDisable;
/// No description provided for @settings_experimentalHideSubtitle.
/// No description provided for @settings_experimentalDisableSubtitle.
///
/// In en, this message translates to:
/// **'Unlock again anytime with 7 taps on the version row.'**
String get settings_experimentalHideSubtitle;
/// **'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.'**
String get settings_experimentalDisableSubtitle;
/// No description provided for @settings_experimentalUnlocked.
///

@ -563,11 +563,11 @@ class AppLocalizationsBg extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -560,11 +560,11 @@ class AppLocalizationsDe extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -551,11 +551,11 @@ class AppLocalizationsEn extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -561,11 +561,11 @@ class AppLocalizationsEs extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -565,11 +565,11 @@ class AppLocalizationsFr extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -563,11 +563,11 @@ class AppLocalizationsHu extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -563,11 +563,11 @@ class AppLocalizationsIt extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -537,11 +537,11 @@ class AppLocalizationsJa extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -537,11 +537,11 @@ class AppLocalizationsKo extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -557,11 +557,11 @@ class AppLocalizationsNl extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -565,11 +565,11 @@ class AppLocalizationsPl extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -563,11 +563,11 @@ class AppLocalizationsPt extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -562,11 +562,11 @@ class AppLocalizationsRu extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -557,11 +557,11 @@ class AppLocalizationsSk extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -555,11 +555,11 @@ class AppLocalizationsSl extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -552,11 +552,11 @@ class AppLocalizationsSv extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -559,11 +559,11 @@ class AppLocalizationsUk extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -530,11 +530,11 @@ class AppLocalizationsZh extends AppLocalizations {
'Requires a firmware build with packet-hash support (v22+).';
@override
String get settings_experimentalHide => 'Hide Experimental section';
String get settings_experimentalDisable => 'Disable experimental features';
@override
String get settings_experimentalHideSubtitle =>
'Unlock again anytime with 7 taps on the version row.';
String get settings_experimentalDisableSubtitle =>
'Turns off all experimental features and hides this section. Unlock again with 7 taps on the Build row.';
@override
String get settings_experimentalUnlocked => 'Experimental features unlocked';

@ -266,14 +266,14 @@ class _SettingsScreenState extends State<SettingsScreen> {
),
),
const SizedBox(height: 16),
// A plain action (not a switch): "hide" is a one-shot, and a switch
// whose ON state means "hidden" read backwards.
// Disable, not just hide: turns off every experimental toggle and
// re-locks the section, so nothing keeps running invisibly (#553).
Card(
child: ListTile(
leading: const Icon(Icons.visibility_off_outlined),
title: Text(l10n.settings_experimentalHide),
subtitle: Text(l10n.settings_experimentalHideSubtitle),
onTap: () => settingsService.setExperimentalUnlocked(false),
leading: const Icon(Icons.block),
title: Text(l10n.settings_experimentalDisable),
subtitle: Text(l10n.settings_experimentalDisableSubtitle),
onTap: () => settingsService.disableExperimental(),
),
),
],

@ -192,6 +192,17 @@ class AppSettingsService extends ChangeNotifier {
);
}
/// Turn off every experimental feature flag and re-lock the section (#553).
/// Add each new experimental toggle here so "Disable" truly disables all.
Future<void> disableExperimental() async {
await updateSettings(
_settings.copyWith(
coreScopeObserverCountEnabled: false,
experimentalUnlocked: false,
),
);
}
Future<void> setMapShowDiscoveryContacts(bool value) async {
await updateSettings(_settings.copyWith(mapShowDiscoveryContacts: value));
}

@ -18,8 +18,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -121,8 +121,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -224,8 +224,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -327,8 +327,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -430,8 +430,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -533,8 +533,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -636,8 +636,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -739,8 +739,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -842,8 +842,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -945,8 +945,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1048,8 +1048,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1151,8 +1151,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1254,8 +1254,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1357,8 +1357,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1460,8 +1460,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1563,8 +1563,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",
@ -1666,8 +1666,8 @@
"settings_coreScopeObserverCount",
"settings_coreScopeObserverCountSubtitle",
"settings_coreScopeObserverCountUnsupported",
"settings_experimentalHide",
"settings_experimentalHideSubtitle",
"settings_experimentalDisable",
"settings_experimentalDisableSubtitle",
"settings_experimentalUnlocked",
"settings_experimentalAlreadyUnlocked",
"settings_experimentalCountdown",

Loading…
Cancel
Save

Powered by TurnKey Linux.