Make all versioning functions internal, move to separate class

This commit is contained in:
goaaats 2025-12-15 21:31:25 +01:00
parent a1409096fd
commit 20af5b40c7
20 changed files with 142 additions and 130 deletions

View file

@ -302,7 +302,7 @@ internal class PluginInstallerWindow : Window, IDisposable
this.profileManagerWidget.Reset();
if (this.staleDalamudNewVersion == null && !Util.GetActiveTrack().IsNullOrEmpty())
if (this.staleDalamudNewVersion == null && !Versioning.GetActiveTrack().IsNullOrEmpty())
{
Service<DalamudReleases>.Get().GetVersionForCurrentTrack().ContinueWith(t =>
{
@ -310,7 +310,7 @@ internal class PluginInstallerWindow : Window, IDisposable
return;
var versionInfo = t.Result;
if (versionInfo.AssemblyVersion != Util.GetScmVersion())
if (versionInfo.AssemblyVersion != Versioning.GetScmVersion())
{
this.staleDalamudNewVersion = versionInfo.AssemblyVersion;
}
@ -1670,7 +1670,7 @@ internal class PluginInstallerWindow : Window, IDisposable
DrawWarningIcon();
DrawLinesCentered("A new version of Dalamud is available.\n" +
"Please restart the game to ensure compatibility with updated plugins.\n" +
$"old: {Util.GetScmVersion()} new: {this.staleDalamudNewVersion}");
$"old: {Versioning.GetScmVersion()} new: {this.staleDalamudNewVersion}");
ImGuiHelpers.ScaledDummy(10);
}
@ -2461,7 +2461,7 @@ internal class PluginInstallerWindow : Window, IDisposable
var isOutdated = effectiveApiLevel < PluginManager.DalamudApiLevel;
var isIncompatible = manifest.MinimumDalamudVersion != null &&
manifest.MinimumDalamudVersion > Util.AssemblyVersionParsed;
manifest.MinimumDalamudVersion > Versioning.GetAssemblyVersionParsed();
var enableInstallButton = this.updateStatus != OperationStatus.InProgress &&
this.installStatus != OperationStatus.InProgress &&