Skip to content

Commit

Permalink
pi: don't show the "frown" button for outdated plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Jul 5, 2024
1 parent 25b10c1 commit 4df929e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2922,12 +2922,12 @@ private void DrawPluginControlButton(LocalPlugin plugin, AvailablePluginUpdate?
var inSingleNonDefaultProfileWhichIsDisabled =
isInSingleProfile && !profilesThatWantThisPlugin.First().IsEnabled;

if (plugin.State is PluginState.UnloadError or PluginState.LoadError or PluginState.DependencyResolutionFailed && !plugin.IsDev)
if (plugin.State is PluginState.UnloadError or PluginState.LoadError or PluginState.DependencyResolutionFailed && !plugin.IsDev && !plugin.IsOutdated)
{
ImGuiComponents.DisabledButton(FontAwesomeIcon.Frown);
ImGuiComponents.DisabledToggleButton(toggleId, false);

if (ImGui.IsItemHovered())
ImGui.SetTooltip(Locs.PluginButtonToolTip_UnloadFailed);
ImGui.SetTooltip(Locs.PluginButtonToolTip_LoadUnloadFailed);
}
else if (this.enableDisableStatus == OperationStatus.InProgress && this.enableDisableWorkingPluginId == plugin.EffectiveWorkingPluginId)
{
Expand Down Expand Up @@ -4000,7 +4000,7 @@ public static string PluginBody_BannedReason(string message) =>

public static string PluginButtonToolTip_UpdateSingle(string version) => Loc.Localize("InstallerUpdateSingle", "Update to {0}").Format(version);

public static string PluginButtonToolTip_UnloadFailed => Loc.Localize("InstallerLoadUnloadFailedTooltip", "Plugin load/unload failed, please restart your game and try again.");
public static string PluginButtonToolTip_LoadUnloadFailed => Loc.Localize("InstallerLoadUnloadFailedTooltip", "Plugin load/unload failed, please restart your game and try again.");

public static string PluginButtonToolTip_NeedsToBeInDefault => Loc.Localize("InstallerUnloadNeedsToBeInDefault", "This plugin is in one or more collections. If you want to enable or disable it, please do so by enabling or disabling the collections it is in.\nIf you want to manage it manually, remove it from all collections.");

Expand Down

0 comments on commit 4df929e

Please sign in to comment.