mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 03:49:19 +01:00
fix: don't unload plugin until update is downloaded, show proper errors
This commit is contained in:
parent
403e94f9d0
commit
7f87d2a9d2
3 changed files with 235 additions and 156 deletions
|
|
@ -728,10 +728,10 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
}
|
||||
else
|
||||
{
|
||||
this.updatedPlugins = task.Result.Where(res => res.WasUpdated).ToList();
|
||||
this.updatedPlugins = task.Result.Where(res => res.Status == PluginUpdateStatus.StatusKind.Success).ToList();
|
||||
this.updatePluginCount = this.updatedPlugins.Count;
|
||||
|
||||
var errorPlugins = task.Result.Where(res => !res.WasUpdated).ToList();
|
||||
var errorPlugins = task.Result.Where(res => res.Status != PluginUpdateStatus.StatusKind.Success).ToList();
|
||||
var errorPluginCount = errorPlugins.Count;
|
||||
|
||||
if (errorPluginCount > 0)
|
||||
|
|
@ -739,9 +739,9 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
var errorMessage = this.updatePluginCount > 0
|
||||
? Locs.ErrorModal_UpdaterFailPartial(this.updatePluginCount, errorPluginCount)
|
||||
: Locs.ErrorModal_UpdaterFail(errorPluginCount);
|
||||
|
||||
|
||||
var hintInsert = errorPlugins
|
||||
.Aggregate(string.Empty, (current, pluginUpdateStatus) => $"{current}* {pluginUpdateStatus.InternalName}\n")
|
||||
.Aggregate(string.Empty, (current, pluginUpdateStatus) => $"{current}* {pluginUpdateStatus.InternalName} ({PluginUpdateStatus.LocalizeUpdateStatusKind(pluginUpdateStatus.Status)})\n")
|
||||
.TrimEnd();
|
||||
errorMessage += Locs.ErrorModal_HintBlame(hintInsert);
|
||||
|
||||
|
|
@ -2250,7 +2250,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
var update = this.updatedPlugins.FirstOrDefault(update => update.InternalName == plugin.Manifest.InternalName);
|
||||
if (update != default)
|
||||
{
|
||||
if (update.WasUpdated)
|
||||
if (update.Status == PluginUpdateStatus.StatusKind.Success)
|
||||
{
|
||||
thisWasUpdated = true;
|
||||
label += Locs.PluginTitleMod_Updated;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue