Skip to content

Commit d8d018b

Browse files
fix: version number formatting from f43e165
Fixing issue caused in f43e165 where we double truncated the version number.
1 parent f43e165 commit d8d018b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/TwitchStreamingTools/Views/MainWindow.axaml.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,11 @@ protected override void OnInitialized() {
5757
Task.Factory.StartNew(async () => {
5858
GithubLatestReleaseJson? serverVersion =
5959
await GitHubUpdateManager.GetLatestVersion("nullinside-development-group", "twitch-streaming-tools");
60-
string? localVersion = Constants.APP_VERSION;
61-
if (null == serverVersion || string.IsNullOrWhiteSpace(serverVersion.name) ||
62-
string.IsNullOrWhiteSpace(localVersion)) {
60+
if (null == serverVersion || string.IsNullOrWhiteSpace(serverVersion.name)) {
6361
return;
6462
}
6563

66-
localVersion = localVersion.Substring(0, localVersion.LastIndexOf('.'));
67-
if (string.IsNullOrWhiteSpace(localVersion)) {
68-
return;
69-
}
70-
71-
if (serverVersion.name?.Equals(localVersion, StringComparison.InvariantCultureIgnoreCase) ?? true) {
64+
if (serverVersion.name?.Equals(Constants.APP_VERSION, StringComparison.InvariantCultureIgnoreCase) ?? true) {
7265
// Had to add this because code clean up tools were removing the "redundant" return statement.
7366
// which was causing the check to always be ignored.
7467
#if !DEBUG
@@ -82,7 +75,7 @@ protected override void OnInitialized() {
8275
return;
8376
}
8477

85-
vm.LocalVersion = localVersion;
78+
vm.LocalVersion = Constants.APP_VERSION;
8679
Dispatcher.UIThread.Post(async void () => {
8780
try {
8881
var versionWindow = new NewVersionWindow {

0 commit comments

Comments
 (0)