Update and improve notifications according to new system

This commit is contained in:
Daniel
2021-05-05 00:27:34 +02:00
parent fa58de2e1b
commit 2e73d4fbe6
8 changed files with 96 additions and 49 deletions

View File

@@ -10,8 +10,6 @@ import (
"sync/atomic"
"time"
"github.com/safing/portbase/database"
"github.com/safing/portbase/notifications"
"github.com/safing/portbase/log"
@@ -257,10 +255,7 @@ func setCaptivePortal(portalURL *url.URL) {
func cleanUpPortalNotification() {
if captivePortalNotification != nil {
err := captivePortalNotification.Delete()
if err != nil && err != database.ErrNotFound {
log.Warningf("netenv: failed to delete old captive portal notification: %s", err)
}
captivePortalNotification.Delete()
captivePortalNotification = nil
}
}