mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Notify on single plugin update
This commit is contained in:
parent
ea9ce0d776
commit
d6fbe7a837
2 changed files with 7 additions and 3 deletions
|
|
@ -789,7 +789,7 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
{
|
||||
this.installStatus = OperationStatus.InProgress;
|
||||
|
||||
Task.Run(() => this.dalamud.PluginManager.UpdateSinglePlugin(update, false))
|
||||
Task.Run(() => this.dalamud.PluginManager.UpdateSinglePlugin(update, true, false))
|
||||
.ContinueWith(task =>
|
||||
{
|
||||
// There is no need to set as Complete for an individual plugin installation
|
||||
|
|
|
|||
|
|
@ -606,7 +606,7 @@ namespace Dalamud.Plugin.Internal
|
|||
// Prevent collection was modified errors
|
||||
for (var i = 0; i < this.updatablePlugins.Count; i++)
|
||||
{
|
||||
updatedList.Add(this.UpdateSinglePlugin(this.updatablePlugins[i], dryRun));
|
||||
updatedList.Add(this.UpdateSinglePlugin(this.updatablePlugins[i], false, dryRun));
|
||||
}
|
||||
|
||||
this.NotifyInstalledPluginsChanged();
|
||||
|
|
@ -620,10 +620,11 @@ namespace Dalamud.Plugin.Internal
|
|||
/// Update a single plugin, provided a valid <see cref="AvailablePluginUpdate"/>.
|
||||
/// </summary>
|
||||
/// <param name="metadata">The available plugin update.</param>
|
||||
/// <param name="notify">Whether to notify that installed plugins have changed afterwards.</param>
|
||||
/// <param name="dryRun">Whether or not to actually perform the update, or just indicate success.</param>
|
||||
/// <returns>The status of the update.</returns>
|
||||
[CanBeNull]
|
||||
public PluginUpdateStatus UpdateSinglePlugin(AvailablePluginUpdate metadata, bool dryRun)
|
||||
public PluginUpdateStatus UpdateSinglePlugin(AvailablePluginUpdate metadata, bool notify, bool dryRun)
|
||||
{
|
||||
var plugin = metadata.InstalledPlugin;
|
||||
|
||||
|
|
@ -685,6 +686,9 @@ namespace Dalamud.Plugin.Internal
|
|||
}
|
||||
}
|
||||
|
||||
if (notify && updateStatus.WasUpdated)
|
||||
this.NotifyInstalledPluginsChanged();
|
||||
|
||||
return updateStatus;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue