From 68ad45074fb0cd3e12c68809dbe00c117e179edd Mon Sep 17 00:00:00 2001 From: Aireil <33433913+Aireil@users.noreply.github.com> Date: Tue, 19 Oct 2021 23:20:13 +0200 Subject: [PATCH] feat: display if a plugin has an update while sending a feedback --- .../Interface/Internal/Windows/PluginInstallerWindow.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs index 9d87600d8..9c300e438 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstallerWindow.cs @@ -386,6 +386,13 @@ namespace Dalamud.Interface.Internal.Windows if (ImGui.BeginPopupModal(modalTitle, ref this.feedbackModalDrawing, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoScrollbar)) { ImGui.Text(Locs.FeedbackModal_Text(this.feedbackPlugin.Name)); + + if (this.pluginListUpdatable.Any( + up => up.InstalledPlugin.Manifest.InternalName == this.feedbackPlugin?.InternalName)) + { + ImGui.TextColored(ImGuiColors.DalamudRed, Locs.FeedbackModal_HasUpdate); + } + ImGui.Spacing(); ImGui.InputTextMultiline("###FeedbackContent", ref this.feedbackModalBody, 1000, new Vector2(400, 200)); @@ -2252,6 +2259,8 @@ namespace Dalamud.Interface.Internal.Windows public static string FeedbackModal_Text(string pluginName) => Loc.Localize("InstallerFeedbackInfo", "You can send feedback to the developer of \"{0}\" here.\nYou can include your Discord tag or email address if you wish to give them the opportunity to answer.").Format(pluginName); + public static string FeedbackModal_HasUpdate => Loc.Localize("InstallerFeedbackHasUpdate", "A new version of this plugin is available, please update before reporting bugs."); + public static string FeedbackModal_ContactInformation => Loc.Localize("InstallerFeedbackContactInfo", "Contact information"); public static string FeedbackModal_IncludeLastError => Loc.Localize("InstallerFeedbackIncludeLastError", "Include last error message");