From a065939ca77eb3dcfb93c24e3422b6cc5f48bade Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Wed, 14 Apr 2021 18:12:52 +0200 Subject: [PATCH] fix: refresh installer window on open --- Dalamud/Plugin/PluginInstallerWindow.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Dalamud/Plugin/PluginInstallerWindow.cs b/Dalamud/Plugin/PluginInstallerWindow.cs index 702958c58..9fca47b82 100644 --- a/Dalamud/Plugin/PluginInstallerWindow.cs +++ b/Dalamud/Plugin/PluginInstallerWindow.cs @@ -55,9 +55,6 @@ namespace Dalamud.Plugin this.Size = new Vector2(810, 520); this.SizeCondition = ImGuiCond.Always; - - if (this.dalamud.PluginRepository.State != PluginRepository.InitializationState.InProgress) - this.dalamud.PluginRepository.ReloadPluginMasterAsync(); } private enum PluginInstallStatus @@ -75,6 +72,23 @@ namespace Dalamud.Plugin LastUpdate, } + public override void OnOpen() + { + base.OnOpen(); + + if (this.dalamud.PluginRepository.State != PluginRepository.InitializationState.InProgress) + this.dalamud.PluginRepository.ReloadPluginMasterAsync(); + + this.pluginListAvailable = null; + this.pluginListInstalled = null; + this.updateComplete = false; + this.updatePluginCount = 0; + this.updatedPlugins = null; + this.searchText = string.Empty; + this.sortKind = PluginSortKind.Alphabetical; + this.filterText = Loc.Localize("SortAlphabetical", "Alphabetical"); + } + /// /// Draw the plugin installer view ImGui. ///