Skip to content

Commit

Permalink
fix: Fix auto-updates every 30 seconds
Browse files Browse the repository at this point in the history
- If no updates are found, properly defer.
  • Loading branch information
KazWolfe committed Jul 5, 2024
1 parent 651179e commit fedd472
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Dalamud/Plugin/Internal/AutoUpdate/AutoUpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,21 @@ private void OnUpdate(IFramework framework)
{
Log.Error(t.Exception!, "Failed to reload plugin masters for auto-update");
}

this.NotifyUpdatesAreAvailable(
this.GetAvailablePluginUpdates(
DecideUpdateListingRestriction(behavior)));

var updatable = this.GetAvailablePluginUpdates(
DecideUpdateListingRestriction(behavior));

if (updatable.Count > 0)
{
this.NotifyUpdatesAreAvailable(updatable);
}
else
{
this.nextUpdateCheckTime = DateTime.Now + TimeBetweenUpdateChecks;
Log.Verbose(
"Auto update found nothing to do, next update at {Time}",
this.nextUpdateCheckTime);
}
});
}
}
Expand Down

0 comments on commit fedd472

Please sign in to comment.