Skip to content

Commit

Permalink
disable update and predownload button if mihoyo api has something wrong
Browse files Browse the repository at this point in the history
5.1 => 5.0 👍
  • Loading branch information
qhy040404 committed Oct 18, 2024
1 parent ecc5117 commit fc315dd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Version? PreVersion

public string PreDownloadTitle { get => SH.FormatViewModelGamePackagePreVersion(PreVersion); }

public bool IsUpdateAvailable { get => LocalVersion != RemoteVersion; }
public bool IsUpdateAvailable { get => LocalVersion < RemoteVersion; }

public bool IsPredownloadButtonEnabled
{
Expand All @@ -91,6 +91,11 @@ public bool IsPredownloadButtonEnabled
return false;
}

if (LocalVersion >= PreVersion)
{
return false;
}

if (!launchOptions.TryGetGameFileSystem(out _))
{
return false;
Expand Down

0 comments on commit fc315dd

Please sign in to comment.