mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: don't try to load changelogs for dev plugins, show changelogs that loaded if any failed
This commit is contained in:
parent
bfbfe8c918
commit
593b338a26
3 changed files with 28 additions and 11 deletions
|
|
@ -241,6 +241,7 @@ internal class TextureManager : IDisposable, IServiceType, ITextureSubstitutionP
|
|||
if (!this.activeTextures.TryGetValue(path, out var info) || info == null)
|
||||
continue;
|
||||
|
||||
info.Wrap?.Dispose();
|
||||
info.Wrap = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using System.Threading.Tasks;
|
|||
using Dalamud.Networking.Http;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Utility;
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.PluginInstaller;
|
||||
|
||||
|
|
@ -44,27 +45,35 @@ internal class DalamudChangelogManager
|
|||
this.Changelogs = null;
|
||||
|
||||
var dalamudChangelogs = await client.GetFromJsonAsync<List<DalamudChangelog>>(DalamudChangelogUrl);
|
||||
var changelogs = dalamudChangelogs.Select(x => new DalamudChangelogEntry(x)).Cast<IChangelogEntry>();
|
||||
var changelogs = dalamudChangelogs.Select(x => new DalamudChangelogEntry(x)).Cast<IChangelogEntry>().ToList();
|
||||
|
||||
foreach (var plugin in this.manager.InstalledPlugins)
|
||||
{
|
||||
if (!plugin.IsThirdParty)
|
||||
if (!plugin.IsThirdParty && !plugin.IsDev)
|
||||
{
|
||||
var pluginChangelogs = await client.GetFromJsonAsync<PluginHistory>(string.Format(
|
||||
PluginChangelogUrl,
|
||||
plugin.Manifest.InternalName,
|
||||
plugin.Manifest.Dip17Channel));
|
||||
try
|
||||
{
|
||||
var pluginChangelogs = await client.GetFromJsonAsync<PluginHistory>(string.Format(
|
||||
PluginChangelogUrl,
|
||||
plugin.Manifest.InternalName,
|
||||
plugin.Manifest.Dip17Channel));
|
||||
|
||||
changelogs = changelogs.Concat(pluginChangelogs.Versions
|
||||
.Where(x => x.Dip17Track == plugin.Manifest.Dip17Channel)
|
||||
.Select(x => new PluginChangelogEntry(plugin, x)));
|
||||
changelogs.AddRange(pluginChangelogs.Versions
|
||||
.Where(x => x.Dip17Track ==
|
||||
plugin.Manifest.Dip17Channel)
|
||||
.Select(x => new PluginChangelogEntry(plugin, x)));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Failed to load changelog for {PluginName}", plugin.Manifest.Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plugin.Manifest.Changelog.IsNullOrWhitespace())
|
||||
continue;
|
||||
|
||||
changelogs = changelogs.Append(new PluginChangelogEntry(plugin));
|
||||
changelogs.Add(new PluginChangelogEntry(plugin));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -967,7 +967,14 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
{
|
||||
this.dalamudChangelogRefreshTaskCts = new CancellationTokenSource();
|
||||
this.dalamudChangelogRefreshTask =
|
||||
Task.Run(this.dalamudChangelogManager.ReloadChangelogAsync, this.dalamudChangelogRefreshTaskCts.Token);
|
||||
Task.Run(this.dalamudChangelogManager.ReloadChangelogAsync, this.dalamudChangelogRefreshTaskCts.Token)
|
||||
.ContinueWith(t =>
|
||||
{
|
||||
if (!t.IsCompletedSuccessfully)
|
||||
{
|
||||
Log.Error(t.Exception, "Failed to load changelogs.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue