Merge pull request 'Only show appear offline if not in test mode (bug in test framework cannot scroll past)' (#723) from stable-blockers into trunk
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Reviewed-on: #723
This commit is contained in:
commit
a788540944
|
@ -268,28 +268,31 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
||||||
secondary: Icon(CwtchIcons.favorite_24dp, color: Provider.of<Settings>(context).current().mainTextColor),
|
secondary: Icon(CwtchIcons.favorite_24dp, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||||
),
|
),
|
||||||
|
|
||||||
// Auto start
|
// Appear Offline
|
||||||
SwitchListTile(
|
Visibility(
|
||||||
title: Text(AppLocalizations.of(context)!.profileAppearOffline, style: TextStyle(color: Provider.of<Settings>(context).current().mainTextColor)),
|
// FIXME don't show the disable switch in test mode...this is a bug relating to scrolling things into view
|
||||||
subtitle: Text(AppLocalizations.of(context)!.profileAppearOfflineDescription),
|
visible: Provider.of<ProfileInfoState>(context).onion.isNotEmpty && (EnvironmentConfig.TEST_MODE == false),
|
||||||
value: Provider.of<ProfileInfoState>(context).appearOffline,
|
child: SwitchListTile(
|
||||||
onChanged: (bool value) {
|
title: Text(AppLocalizations.of(context)!.profileAppearOffline, style: TextStyle(color: Provider.of<Settings>(context).current().mainTextColor)),
|
||||||
Provider.of<ProfileInfoState>(context, listen: false).appearOffline = value;
|
subtitle: Text(AppLocalizations.of(context)!.profileAppearOfflineDescription),
|
||||||
var onion = Provider.of<ProfileInfoState>(context, listen: false).onion;
|
value: Provider.of<ProfileInfoState>(context).appearOffline,
|
||||||
if (!onion.isEmpty) {
|
onChanged: (bool value) {
|
||||||
Provider.of<FlwtchState>(context, listen: false).cwtch.SetProfileAttribute(onion, "profile.appear-offline", value ? "true" : "false");
|
Provider.of<ProfileInfoState>(context, listen: false).appearOffline = value;
|
||||||
// if the profile is already enabled, then cycle the peer engine...
|
var onion = Provider.of<ProfileInfoState>(context, listen: false).onion;
|
||||||
if (value == true && Provider.of<ProfileInfoState>(context, listen: false).enabled) {
|
if (!onion.isEmpty) {
|
||||||
Provider.of<ProfileInfoState>(context, listen: false).deactivatePeerEngine(context);
|
Provider.of<FlwtchState>(context, listen: false).cwtch.SetProfileAttribute(onion, "profile.appear-offline", value ? "true" : "false");
|
||||||
Provider.of<FlwtchState>(context, listen: false).cwtch.ActivatePeerEngine(onion);
|
// if the profile is already enabled, then cycle the peer engine...
|
||||||
Provider.of<FlwtchState>(context, listen: false).cwtch.ConfigureConnections(onion, false, false, false);
|
if (value == true && Provider.of<ProfileInfoState>(context, listen: false).enabled) {
|
||||||
}
|
Provider.of<ProfileInfoState>(context, listen: false).deactivatePeerEngine(context);
|
||||||
}
|
Provider.of<FlwtchState>(context, listen: false).cwtch.ActivatePeerEngine(onion);
|
||||||
},
|
Provider.of<FlwtchState>(context, listen: false).cwtch.ConfigureConnections(onion, false, false, false);
|
||||||
activeTrackColor: Provider.of<Settings>(context).theme.defaultButtonColor,
|
}
|
||||||
inactiveTrackColor: Provider.of<Settings>(context).theme.defaultButtonDisabledColor,
|
}
|
||||||
secondary: Icon(CwtchIcons.favorite_24dp, color: Provider.of<Settings>(context).current().mainTextColor),
|
},
|
||||||
),
|
activeTrackColor: Provider.of<Settings>(context).theme.defaultButtonColor,
|
||||||
|
inactiveTrackColor: Provider.of<Settings>(context).theme.defaultButtonDisabledColor,
|
||||||
|
secondary: Icon(CwtchIcons.favorite_24dp, color: Provider.of<Settings>(context).current().mainTextColor),
|
||||||
|
)),
|
||||||
|
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: Provider.of<ProfileInfoState>(context).onion.isEmpty,
|
visible: Provider.of<ProfileInfoState>(context).onion.isEmpty,
|
||||||
|
|
Loading…
Reference in New Issue