Skip to content
Snippets Groups Projects
Unverified Commit 60310f3b authored by meskio's avatar meskio :tent:
Browse files

[feat] fake state on click

Let's change the systray state as soon as the user clicks on it, instead
of waiting for openvpn to notify the status change.
parent 7d6853c5
Branches
Tags
No related merge requests found
......@@ -105,14 +105,17 @@ func (bt *bmTray) onReady() {
case <-bt.mTurnOn.ClickedCh:
log.Println("on")
bt.changeStatus("starting")
bt.bm.StartVPN(provider)
bt.conf.setUserStoppedVPN(false)
case <-bt.mTurnOff.ClickedCh:
log.Println("off")
bt.changeStatus("stopping")
bt.bm.StopVPN()
bt.conf.setUserStoppedVPN(true)
case <-bt.mCancel.ClickedCh:
log.Println("cancel")
bt.changeStatus("stopping")
bt.bm.StopVPN()
bt.conf.setUserStoppedVPN(true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment