mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
This commit is contained in:
parent
905ab7cf98
commit
45996b730e
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user