Skip to content

Commit e2e7c6b

Browse files
Fixed issue with "current version label"
•Fixed issue with "current version label" being previous public build when debugging new unreleased builds
1 parent 14f8f63 commit e2e7c6b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

UpdateAvailable.vb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Imports System.IO
22
Imports System.Net.Http
33
Imports System.Reflection
4+
Imports System.Reflection.Emit
45
Imports System.Windows.Forms
56
Imports Newtonsoft.Json.Linq
67

@@ -125,11 +126,22 @@ Public Class UpdateAvailable
125126
' Check if an update is available and safely update Button1.Enabled on the UI thread
126127
Dim updateAvailable As Boolean = (newVersion > currentVersion) AndAlso (isBeta = False OrElse (isBeta = True AndAlso betaSetting = True)) OrElse (newVersion = currentVersion AndAlso isBeta = True AndAlso betaSetting = True AndAlso newBetaLetter > currentBetaLetter)
127128

129+
' No Update Avaliable
128130
If Not updateAvailable Then
129131
Me.Invoke(Sub() Text = "True Stretched - No Updates Available")
130132
Me.Invoke(Sub() Label1.Text = "Current Version Up to Date:")
131133
Me.Invoke(Sub() Label2.Location = New Point(179, 9))
132134

135+
'Set Version label to Current Version (Fixes issue when build is higher then public build)
136+
currentVersionLong = Assembly.GetExecutingAssembly().GetName().Version
137+
Dim currentVersionString As String = String.Format("{0}.{1}.{2}", currentVersionLong.Major, currentVersionLong.Minor, currentVersionLong.Build)
138+
139+
If My.Settings.BetaBuild = True Then
140+
Label2.Text = "Version: " & currentVersionString & My.Settings.BetaLetter & " Beta"
141+
Else
142+
Label2.Text = "Version: " & currentVersionString
143+
End If
144+
133145
Me.Invoke(Sub() Button1.Enabled = False)
134146
Me.Invoke(Sub() Button2.Enabled = False)
135147
End If

0 commit comments

Comments
 (0)