fix: don't auto-update disabled plugins, don't let styles modify our toggle switch

This commit is contained in:
goat 2022-07-17 15:39:41 +02:00
parent 8c066451ec
commit f65ccca675
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5
6 changed files with 112 additions and 18 deletions

View file

@ -884,7 +884,7 @@ internal partial class PluginManager : IDisposable, IServiceType
/// </summary>
/// <param name="dryRun">Perform a dry run, don't install anything.</param>
/// <returns>Success or failure and a list of updated plugin metadata.</returns>
public async Task<List<PluginUpdateStatus>> UpdatePluginsAsync(bool dryRun = false)
public async Task<List<PluginUpdateStatus>> UpdatePluginsAsync(bool ignoreDisabled, bool dryRun)
{
Log.Information("Starting plugin update");
@ -897,6 +897,9 @@ internal partial class PluginManager : IDisposable, IServiceType
if (plugin.InstalledPlugin.IsDev)
continue;
if (plugin.InstalledPlugin.Manifest.Disabled && ignoreDisabled)
continue;
var result = await this.UpdateSinglePluginAsync(plugin, false, dryRun);
if (result != null)
updatedList.Add(result);