-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Whenever there is an installid mismatch on the K+ backend, prompt the…
… user to overwrite it (aka reset then register). This should make for a much better experience.
- Loading branch information
1 parent
5f176ed
commit 3f1f42a
Showing
8 changed files
with
223 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
|
||
namespace API.Extensions; | ||
|
||
public static class VersionExtensions | ||
{ | ||
public static bool CompareWithoutRevision(this Version v1, Version v2) | ||
{ | ||
if (v1.Major != v2.Major) | ||
return v1.Major == v2.Major; | ||
if (v1.Minor != v2.Minor) | ||
return v1.Minor == v2.Minor; | ||
if (v1.Build != v2.Build) | ||
return v1.Build == v2.Build; | ||
return true; | ||
} | ||
|
||
|
||
/// <summary> | ||
/// v0.8.2.3 is within v0.8.2 (v1). Essentially checks if this is a Nightly of a stable release | ||
/// </summary> | ||
/// <param name="v1"></param> | ||
/// <param name="v2"></param> | ||
/// <returns></returns> | ||
public static bool IsWithinStableRelease(this Version v1, Version v2) | ||
{ | ||
return v1.Major == v2.Major && v1.Minor != v2.Minor && v1.Build != v2.Build; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.