mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Update upgrader notification action to recent update
This commit is contained in:
parent
b7f0b851ae
commit
f71ee66532
1 changed files with 4 additions and 2 deletions
|
@ -119,7 +119,7 @@ func upgradeCoreNotify() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func upgradeCoreNotifyActionHandler(n *notifications.Notification) {
|
func upgradeCoreNotifyActionHandler(_ context.Context, n *notifications.Notification) error {
|
||||||
switch n.SelectedActionID {
|
switch n.SelectedActionID {
|
||||||
case "restart":
|
case "restart":
|
||||||
// Cannot directly trigger due to import loop.
|
// Cannot directly trigger due to import loop.
|
||||||
|
@ -133,8 +133,10 @@ func upgradeCoreNotifyActionHandler(n *notifications.Notification) {
|
||||||
log.Warningf("updates: failed to trigger restart via notification: %s", err)
|
log.Warningf("updates: failed to trigger restart via notification: %s", err)
|
||||||
}
|
}
|
||||||
case "later":
|
case "later":
|
||||||
n.Expires = time.Now().Unix() // expire immediately
|
n.Delete()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func upgradeHub() error {
|
func upgradeHub() error {
|
||||||
|
|
Loading…
Add table
Reference in a new issue