Run Join/Leave commands asynchronously so the UI doesn't lock up on thoise commands
This commit is contained in:
parent
b3dd5c0e3a
commit
73f7088b45
4 changed files with 112 additions and 90 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue