fix: force IsHide to false for main repo api9 plugins

makes outdated plugins show again when searched for
This commit is contained in:
goat 2023-10-05 21:54:07 +02:00
parent 3a922e4d58
commit 5033a4b770
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
3 changed files with 11 additions and 3 deletions

View file

@ -1909,7 +1909,6 @@ internal class PluginInstallerWindow : Window, IDisposable
private void DrawAvailablePlugin(RemotePluginManifest manifest, int index) private void DrawAvailablePlugin(RemotePluginManifest manifest, int index)
{ {
var configuration = Service<DalamudConfiguration>.Get(); var configuration = Service<DalamudConfiguration>.Get();
var notifications = Service<NotificationManager>.Get();
var pluginManager = Service<PluginManager>.Get(); var pluginManager = Service<PluginManager>.Get();
var useTesting = pluginManager.UseTesting(manifest); var useTesting = pluginManager.UseTesting(manifest);

View file

@ -42,11 +42,11 @@ internal record PluginManifest : IPluginManifest
public List<string>? CategoryTags { get; init; } public List<string>? CategoryTags { get; init; }
/// <summary> /// <summary>
/// Gets a value indicating whether or not the plugin is hidden in the plugin installer. /// Gets or sets a value indicating whether or not the plugin is hidden in the plugin installer.
/// This value comes from the plugin master and is in addition to the list of hidden names kept by Dalamud. /// This value comes from the plugin master and is in addition to the list of hidden names kept by Dalamud.
/// </summary> /// </summary>
[JsonProperty] [JsonProperty]
public bool IsHide { get; init; } public bool IsHide { get; set; }
/// <inheritdoc/> /// <inheritdoc/>
[JsonProperty] [JsonProperty]

View file

@ -148,6 +148,15 @@ internal class PluginRepository
} }
this.PluginMaster = pluginMaster.Where(this.IsValidManifest).ToList().AsReadOnly(); this.PluginMaster = pluginMaster.Where(this.IsValidManifest).ToList().AsReadOnly();
// API9 HACK: Force IsHide to false, we should remove that
if (!this.IsThirdParty)
{
foreach (var manifest in this.PluginMaster)
{
manifest.IsHide = false;
}
}
Log.Information($"Successfully fetched repo: {this.PluginMasterUrl}"); Log.Information($"Successfully fetched repo: {this.PluginMasterUrl}");
this.State = PluginRepositoryState.Success; this.State = PluginRepositoryState.Success;