summaryrefslogtreecommitdiff
path: root/systray.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-03-27 22:30:56 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2018-04-11 01:26:37 +0200
commita45d99f2dd4d3694160580184f0573a15c06708f (patch)
treea3f217997daa9dce1dc94125b99ccb1727a306bd /systray.go
parent2d0f7c1aa92dee25e923c31456cdd3763dec1ada (diff)
[feat] autoconnect if is the first run or was not manually stopped
- Resolves: #23
Diffstat (limited to 'systray.go')
-rw-r--r--systray.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/systray.go b/systray.go
index c61ca5d..b3c020d 100644
--- a/systray.go
+++ b/systray.go
@@ -97,12 +97,15 @@ func (bt *bmTray) onReady() {
case <-bt.mTurnOn.ClickedCh:
log.Println("on")
bt.bm.StartVPN(provider)
+ bt.conf.setUserStoppedVPN(false)
case <-bt.mTurnOff.ClickedCh:
log.Println("off")
bt.bm.StopVPN()
+ bt.conf.setUserStoppedVPN(true)
case <-bt.mCancel.ClickedCh:
log.Println("cancel")
bt.bm.StopVPN()
+ bt.conf.setUserStoppedVPN(true)
case <-mHelp.ClickedCh:
open.Run("https://riseup.net/vpn")