hide blodeuwedd in settings if not supported
This commit is contained in:
parent
68c83f2c9a
commit
e0546eb502
|
@ -162,27 +162,29 @@ class _GlobalSettingsExperimentsViewState extends State<GlobalSettingsExperiment
|
|||
),
|
||||
]),
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.blodeuweddExperimentEnable),
|
||||
subtitle: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
||||
? Text(AppLocalizations.of(context)!.blodeuweddDescription)
|
||||
: Text(AppLocalizations.of(context)!.blodeuweddNotSupported),
|
||||
value: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
||||
onChanged: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
||||
? (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(BlodeuweddExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(BlodeuweddExperiment);
|
||||
Visibility(
|
||||
visible: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported(),
|
||||
child: SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.blodeuweddExperimentEnable),
|
||||
subtitle: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
||||
? Text(AppLocalizations.of(context)!.blodeuweddDescription)
|
||||
: Text(AppLocalizations.of(context)!.blodeuweddNotSupported),
|
||||
value: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
||||
onChanged: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported()
|
||||
? (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(BlodeuweddExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(BlodeuweddExperiment);
|
||||
}
|
||||
saveSettings(context);
|
||||
}
|
||||
saveSettings(context);
|
||||
}
|
||||
: null,
|
||||
activeTrackColor: settings.theme.defaultButtonColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
inactiveThumbColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.assistant, color: settings.current().mainTextColor),
|
||||
),
|
||||
: null,
|
||||
activeTrackColor: settings.theme.defaultButtonColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
inactiveThumbColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.assistant, color: settings.current().mainTextColor),
|
||||
)),
|
||||
Visibility(
|
||||
visible: Provider.of<FlwtchState>(context, listen: false).cwtch.IsBlodeuweddSupported() && settings.isExperimentEnabled(BlodeuweddExperiment),
|
||||
child: CwtchFolderPicker(
|
||||
|
|
Loading…
Reference in New Issue