autoupdate: consider notification dismissal time as last check time

This commit is contained in:
goat 2024-06-17 19:23:55 +02:00
parent c91e24cb58
commit 5f51ca22e0

View file

@ -228,7 +228,11 @@ internal class AutoUpdateManager : IServiceType
throw new InvalidOperationException("Already showing a notification"); throw new InvalidOperationException("Already showing a notification");
this.updateNotification = this.notificationManager.AddNotification(notification); this.updateNotification = this.notificationManager.AddNotification(notification);
this.updateNotification.Dismiss += _ => this.updateNotification = null; this.updateNotification.Dismiss += _ =>
{
this.updateNotification = null;
this.lastUpdateCheckTime = DateTime.Now;
};
return this.updateNotification!; return this.updateNotification!;
} }
@ -444,7 +448,7 @@ internal class AutoUpdateManager : IServiceType
=> string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContent", "There are {0} plugins that can be updated."), numUpdates); => string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContent", "There are {0} plugins that can be updated."), numUpdates);
public static string NotificationContentUpdatesAvailableMinimized(int numUpdates) public static string NotificationContentUpdatesAvailableMinimized(int numUpdates)
=> string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContent", "{0} updates available."), numUpdates); => string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContent", "{0} plugin updates"), numUpdates);
public static string NotificationContentPreparingToUpdate(int numPlugins) public static string NotificationContentPreparingToUpdate(int numPlugins)
=> string.Format(Loc.Localize("AutoUpdatePreparingToUpdate", "Preparing to update {0} plugins..."), numPlugins); => string.Format(Loc.Localize("AutoUpdatePreparingToUpdate", "Preparing to update {0} plugins..."), numPlugins);