Skip to content

Commit

Permalink
autoupdate: consider notification dismissal time as last check time
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Jun 17, 2024
1 parent c91e24c commit 5f51ca2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ private IActiveNotification GetBaseNotification(Notification notification)
throw new InvalidOperationException("Already showing a 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!;
}
Expand Down Expand Up @@ -444,7 +448,7 @@ public static string NotificationContentUpdatesAvailable(int numUpdates)
=> string.Format(Loc.Localize("AutoUpdateUpdatesAvailableContent", "There are {0} plugins that can be updated."), 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)
=> string.Format(Loc.Localize("AutoUpdatePreparingToUpdate", "Preparing to update {0} plugins..."), numPlugins);
Expand Down

0 comments on commit 5f51ca2

Please sign in to comment.