Merge pull request 'Remove Activate Peer Engine from Mode Switch (Configure Connections Does this Automatically)' (#726) from stable-blockers into trunk
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
Reviewed-on: #726 Reviewed-by: Dan Ballard <dan@openprivacy.ca>
This commit is contained in:
commit
877a4e4fb3
|
@ -236,9 +236,10 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
onChanged: (bool value) {
|
||||
Provider.of<ProfileInfoState>(context, listen: false).enabled = value;
|
||||
if (value) {
|
||||
Provider.of<FlwtchState>(context, listen: false).cwtch.ActivatePeerEngine(Provider.of<ProfileInfoState>(context, listen: false).onion);
|
||||
if (Provider.of<ProfileInfoState>(context, listen: false).appearOffline == false) {
|
||||
Provider.of<FlwtchState>(context, listen: false).cwtch.ConfigureConnections(Provider.of<ProfileInfoState>(context, listen: false).onion, true, true, true);
|
||||
} else {
|
||||
Provider.of<FlwtchState>(context, listen: false).cwtch.ConfigureConnections(Provider.of<ProfileInfoState>(context, listen: false).onion, false, false, false);
|
||||
}
|
||||
} else {
|
||||
Provider.of<ProfileInfoState>(context, listen: false).deactivatePeerEngine(context);
|
||||
|
@ -284,7 +285,6 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
// if the profile is already enabled, then cycle the peer engine...
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,6 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
break;
|
||||
case ProfileStatusMenu.appearOffline:
|
||||
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);
|
||||
break;
|
||||
case ProfileStatusMenu.editProfile:
|
||||
|
|
Loading…
Reference in New Issue