From 0c1b2a03b2d454d55cf53b45ffd6c8f7cb7d1750 Mon Sep 17 00:00:00 2001 From: goat Date: Thu, 18 Jul 2024 23:37:12 +0200 Subject: [PATCH] pi: only show update warning if key matches --- .../Windows/PluginInstaller/PluginInstallerWindow.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 52950b520..d4700ddb5 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -295,8 +295,8 @@ internal class PluginInstallerWindow : Window, IDisposable this.profileManagerWidget.Reset(); - // TODO: Actually check if we are on a tag-0 version here. We might be opted into a beta but have a wrong key. - if (this.staleDalamudNewVersion == null && !Service.Get().DalamudBetaKind.IsNullOrEmpty()) + var config = Service.Get(); + if (this.staleDalamudNewVersion == null && !config.DalamudBetaKind.IsNullOrEmpty()) { Service.Get().GetVersionForCurrentTrack().ContinueWith(t => { @@ -304,7 +304,9 @@ internal class PluginInstallerWindow : Window, IDisposable return; var versionInfo = t.Result; - if (versionInfo.AssemblyVersion != Util.GetGitHash() && versionInfo.Track != "release") + if (versionInfo.AssemblyVersion != Util.GetGitHash() && + versionInfo.Track != "release" && + string.Equals(versionInfo.Key, config.DalamudBetaKey, StringComparison.OrdinalIgnoreCase)) this.staleDalamudNewVersion = versionInfo.AssemblyVersion; }); }