From 39bd3edcd7faadee112656f2193dc2092100ac65 Mon Sep 17 00:00:00 2001 From: JonKazama-Hellion Date: Fri, 1 May 2026 21:09:41 +0200 Subject: [PATCH] Register OpenMainUi callback to satisfy Dalamud validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The plugin list expects a main UI entry point so the "Open Plugin" button has something to fire on. Hook UiBuilder.OpenMainUi to a toggle of the settings window — same surface as OpenConfigUi, just exposed under both buttons. Wiring lives in Plugin.cs (not the inherited Settings.cs) so future upstream cherry-picks don't fight with this addition. --- ChatTwo/Plugin.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ChatTwo/Plugin.cs b/ChatTwo/Plugin.cs index 25474d9..959478a 100755 --- a/ChatTwo/Plugin.cs +++ b/ChatTwo/Plugin.cs @@ -204,6 +204,11 @@ public sealed class Plugin : IDalamudPlugin Framework.Update += FrameworkUpdate; Interface.UiBuilder.Draw += Draw; Interface.LanguageChanged += LanguageChanged; + // Hellion Chat — surface a "main UI" entry point so Dalamud's + // plugin list shows the Open-Plugin button. Settings is the + // most useful landing place; OpenConfigUi is already wired to + // the same toggle inside SettingsWindow. + Interface.UiBuilder.OpenMainUi += OpenMainUi; if (Config.ShowEmotes) Task.Run(EmoteCache.LoadData); @@ -240,6 +245,7 @@ public sealed class Plugin : IDalamudPlugin [SuppressMessage("ReSharper", "ConditionalAccessQualifierIsNonNullableAccordingToAPIContract")] public void Dispose() { + Interface.UiBuilder.OpenMainUi -= OpenMainUi; Interface.LanguageChanged -= LanguageChanged; Interface.UiBuilder.Draw -= Draw; Framework.Update -= FrameworkUpdate; @@ -323,6 +329,15 @@ public sealed class Plugin : IDalamudPlugin } } + private void OpenMainUi() + { + // Settings is the most useful landing surface — same target as the + // Configure button. SettingsWindow.Toggle is internal and already + // wired to OpenConfigUi, so re-using IsOpen keeps both entry points + // behaviourally identical. + SettingsWindow.IsOpen = !SettingsWindow.IsOpen; + } + private void RunRetentionSweepIfDue() { if (!Config.RetentionEnabled)