diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 8d22db568..4cd4b7235 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -210,23 +210,13 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl /// internal UiBuilder LocalUiBuilder => this.uiBuilder; - /// - /// Opens the with the plugin name set as search target. - /// - /// Returns false if the DalamudInterface was null. - [Api10ToDo(Api10ToDoAttribute.DeleteCompatBehavior)] - public bool OpenPluginInstaller() - { - return this.OpenPluginInstallerTo(PluginInstallerOpenKind.InstalledPlugins, this.plugin.InternalName); - } - /// /// Opens the , with an optional search term. /// /// The page to open the installer to. Defaults to the "All Plugins" page. /// An optional search text to input in the search box. /// Returns false if the DalamudInterface was null. - public bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string searchText = null) + public bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string? searchText = null) { var dalamudInterface = Service.GetNullable(); // Can be null during boot if (dalamudInterface == null) @@ -235,7 +225,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl } dalamudInterface.OpenPluginInstallerTo(openTo); - dalamudInterface.SetPluginInstallerSearchText(searchText); + dalamudInterface.SetPluginInstallerSearchText(searchText ?? string.Empty); return true; } @@ -246,7 +236,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl /// The tab to open the settings to. Defaults to the "General" tab. /// An optional search text to input in the search box. /// Returns false if the DalamudInterface was null. - public bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string searchText = null) + public bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string? searchText = null) { var dalamudInterface = Service.GetNullable(); // Can be null during boot if (dalamudInterface == null) @@ -255,7 +245,7 @@ public sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposabl } dalamudInterface.OpenSettingsTo(openTo); - dalamudInterface.SetSettingsSearchText(searchText); + dalamudInterface.SetSettingsSearchText(searchText ?? string.Empty); return true; } diff --git a/Dalamud/Plugin/IDalamudPluginInterface.cs b/Dalamud/Plugin/IDalamudPluginInterface.cs index 7f660f3cd..6393dc5ab 100644 --- a/Dalamud/Plugin/IDalamudPluginInterface.cs +++ b/Dalamud/Plugin/IDalamudPluginInterface.cs @@ -157,19 +157,13 @@ public interface IDalamudPluginInterface /// IEnumerable InstalledPlugins { get; } - /// - /// Opens the with the plugin name set as search target. - /// - /// Returns false if the DalamudInterface was null. - bool OpenPluginInstaller(); - /// /// Opens the , with an optional search term. /// /// The page to open the installer to. Defaults to the "All Plugins" page. /// An optional search text to input in the search box. /// Returns false if the DalamudInterface was null. - bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string searchText = null); + bool OpenPluginInstallerTo(PluginInstallerOpenKind openTo = PluginInstallerOpenKind.AllPlugins, string? searchText = null); /// /// Opens the , with an optional search term. @@ -177,7 +171,7 @@ public interface IDalamudPluginInterface /// The tab to open the settings to. Defaults to the "General" tab. /// An optional search text to input in the search box. /// Returns false if the DalamudInterface was null. - bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string searchText = null); + bool OpenDalamudSettingsTo(SettingsOpenKind openTo = SettingsOpenKind.General, string? searchText = null); /// /// Opens the dev menu bar.