From 24e77dd9ca2a9ca30c9c65823aea87c607896145 Mon Sep 17 00:00:00 2001
From: Ruben Pollan <meskio@sindominio.net>
Date: Tue, 20 Mar 2018 11:29:44 +0100
Subject: [PATCH] [feat] let's not notify about donations for now

As MVP we decided to remove the donations notifications for now.

- Resolves: #21
---
 notificator.go |  2 +-
 systray.go     | 16 ----------------
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/notificator.go b/notificator.go
index 7c53d187..9ce224f8 100644
--- a/notificator.go
+++ b/notificator.go
@@ -41,7 +41,7 @@ func newNotificator(conf *systrayConfig) *notificator {
 		AppName:     "RiseupVPN",
 	})
 	n := notificator{notify, conf}
-	go n.donations()
+	//go n.donations()
 	return &n
 }
 
diff --git a/systray.go b/systray.go
index cafc7373..51d4ed1a 100644
--- a/systray.go
+++ b/systray.go
@@ -33,7 +33,6 @@ type bmTray struct {
 	mTurnOn       *systray.MenuItem
 	mTurnOff      *systray.MenuItem
 	mDonate       *systray.MenuItem
-	mHaveDonated  *systray.MenuItem
 	mCancel       *systray.MenuItem
 	activeGateway *gatewayTray
 }
@@ -71,7 +70,6 @@ func (bt *bmTray) onReady() {
 
 	mHelp := systray.AddMenuItem(printer.Sprintf("Help ..."), "")
 	bt.mDonate = systray.AddMenuItem(printer.Sprintf("Donate ..."), "")
-	bt.mHaveDonated = systray.AddMenuItem(printer.Sprintf("... I have donated"), "")
 	mAbout := systray.AddMenuItem(printer.Sprintf("About ..."), "")
 	systray.AddSeparator()
 
@@ -86,8 +84,6 @@ func (bt *bmTray) onReady() {
 		}
 
 		for {
-			bt.updateDonateMenu()
-
 			select {
 			case status := <-ch:
 				log.Println("status: " + status)
@@ -107,8 +103,6 @@ func (bt *bmTray) onReady() {
 				open.Run("https://riseup.net/vpn")
 			case <-bt.mDonate.ClickedCh:
 				open.Run("https://riseup.net/donate-vpn")
-			case <-bt.mHaveDonated.ClickedCh:
-				bt.conf.setDonated()
 			case <-mAbout.ClickedCh:
 				open.Run("https://bitmask.net")
 
@@ -209,16 +203,6 @@ func (bt *bmTray) changeStatus(status string) {
 	bt.mStatus.SetTooltip(printer.Sprintf("RiseupVPN is %v", statusStr))
 }
 
-func (bt *bmTray) updateDonateMenu() {
-	if bt.conf.hasDonated() {
-		bt.mHaveDonated.Hide()
-		bt.mDonate.Hide()
-	} else {
-		bt.mHaveDonated.Show()
-		bt.mDonate.Show()
-	}
-}
-
 func (bt *bmTray) waitIcon() {
 	icons := [][]byte{icon.Wait0, icon.Wait1, icon.Wait2, icon.Wait3}
 	for i := 0; true; i = (i + 1) % 4 {
-- 
GitLab