Run Join/Leave commands asynchronously so the UI doesn't lock up on thoise commands

This commit is contained in:
Grant Limberg 2017-05-08 16:17:03 -07:00
parent b3dd5c0e3a
commit 73f7088b45
4 changed files with 112 additions and 90 deletions

View file

@ -269,11 +269,11 @@ namespace WinUI
ZeroTierNetwork network = item.DataContext as ZeroTierNetwork;
if (item.IsChecked)
{
APIHandler.Instance.LeaveNetwork(network.NetworkId);
APIHandler.Instance.LeaveNetwork(this.Dispatcher, network.NetworkId);
}
else
{
APIHandler.Instance.JoinNetwork(network.NetworkId, network.AllowManaged, network.AllowGlobal, network.AllowDefault);
APIHandler.Instance.JoinNetwork(this.Dispatcher, network.NetworkId, network.AllowManaged, network.AllowGlobal, network.AllowDefault);
}
}
}