summaryrefslogtreecommitdiff
path: root/pkg/config
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/gui.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/config/gui.go b/pkg/config/gui.go
index ce3f14d..5fa4886 100644
--- a/pkg/config/gui.go
+++ b/pkg/config/gui.go
@@ -37,7 +37,7 @@ var (
// Config holds the configuration of the systray
type Config struct {
file struct {
- LastNotification time.Time
+ LastReminded time.Time
Donated time.Time
SelectGateway bool
Obfs4 bool
@@ -77,16 +77,16 @@ func (c *Config) SetUserStoppedVPN(vpnStopped bool) error {
return c.save()
}
-func (c *Config) HasDonated() bool {
- return c.file.Donated.Add(oneMonth).After(time.Now())
+func (c *Config) NeedsDonationReminder() bool {
+ return !c.hasDonated() && c.file.LastReminded.Add(oneDay).Before(time.Now())
}
-func (c *Config) NeedsNotification() bool {
- return !c.HasDonated() && c.file.LastNotification.Add(oneDay).Before(time.Now())
+func (c *Config) hasDonated() bool {
+ return c.file.Donated.Add(oneMonth).After(time.Now())
}
-func (c *Config) SetNotification() error {
- c.file.LastNotification = time.Now()
+func (c *Config) SetLastReminded() error {
+ c.file.LastReminded = time.Now()
return c.save()
}