summaryrefslogtreecommitdiff
path: root/pkg/backend/donate.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/backend/donate.go')
-rw-r--r--pkg/backend/donate.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/backend/donate.go b/pkg/backend/donate.go
index f87934a..c16c0f4 100644
--- a/pkg/backend/donate.go
+++ b/pkg/backend/donate.go
@@ -4,12 +4,12 @@ import (
"time"
)
-// runDonationReminder checks every hour if we need to show the reminder,
+// runDonationReminder checks every six hours if we need to show the reminder,
// and trigger the launching of the dialog if needed.
func runDonationReminder() {
go func() {
for {
- time.Sleep(time.Hour)
+ time.Sleep(time.Hour * 6)
if needsDonationReminder() {
showDonate()
}
@@ -21,6 +21,14 @@ func needsDonationReminder() bool {
return ctx.cfg.NeedsDonationReminder()
}
+/* to be called from the gui, the visibility toggle will be updated on the next
+ status change */
+func donateSeen() {
+ statusMutex.Lock()
+ defer statusMutex.Unlock()
+ ctx.DonateDialog = false
+}
+
func donateAccepted() {
statusMutex.Lock()
defer statusMutex.Unlock()