Skip to content

Commit

Permalink
my dumbass
Browse files Browse the repository at this point in the history
  • Loading branch information
4sval committed Oct 11, 2024
1 parent 905ab7c commit 45996b7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions FModel/ViewModels/ApiEndpoints/FModelApiEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ private void ParseUpdateInfoEvent(ParseUpdateInfoEventArgs args)
CurrentVersion = _infos.Version.SubstringBefore('-'),
ChangelogURL = _infos.ChangelogUrl,
DownloadURL = _infos.DownloadUrl,
Mandatory = new Mandatory
Mandatory = new CustomMandatory
{
MinimumVersion = _infos.Version.SubstringAfter('+')
CommitHash = _infos.Version.SubstringAfter('+')
}
};
}
Expand All @@ -139,7 +139,7 @@ private void CheckForUpdateEvent(UpdateInfoEventArgs args)
{
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);
Expand Down Expand Up @@ -173,3 +173,9 @@ private void ShowChangelog(UpdateInfoEventArgs args)
UserSettings.Default.ShowChangelog = false;
}
}

public class CustomMandatory : Mandatory
{
public string CommitHash { get; set; }
public string ShortCommitHash => CommitHash[..7];
}

0 comments on commit 45996b7

Please sign in to comment.