my dumbass
Some checks are pending
FModel QA Builder / build (push) Waiting to run

This commit is contained in:
Asval 2024-10-11 18:31:05 +02:00
parent 905ab7cf98
commit 45996b730e

View File

@ -125,9 +125,9 @@ public class FModelApiEndpoint : AbstractApiProvider
CurrentVersion = _infos.Version.SubstringBefore('-'),
ChangelogURL = _infos.ChangelogUrl,
DownloadURL = _infos.DownloadUrl,
Mandatory = new Mandatory
Mandatory = new CustomMandatory
{
MinimumVersion = _infos.Version.SubstringAfter('+')
CommitHash = _infos.Version.SubstringAfter('+')
}
};
}
@ -139,7 +139,7 @@ public class FModelApiEndpoint : AbstractApiProvider
{
UserSettings.Default.LastUpdateCheck = DateTime.Now;
if (args.Mandatory.MinimumVersion == Constants.APP_COMMIT_ID)
if (((CustomMandatory)args.Mandatory).CommitHash == Constants.APP_COMMIT_ID)
{
if (UserSettings.Default.ShowChangelog)
ShowChangelog(args);
@ -173,3 +173,9 @@ public class FModelApiEndpoint : AbstractApiProvider
UserSettings.Default.ShowChangelog = false;
}
}
public class CustomMandatory : Mandatory
{
public string CommitHash { get; set; }
public string ShortCommitHash => CommitHash[..7];
}