Skip to content

Commit da8b5cd

Browse files
committed
Fix title
1 parent d94ab10 commit da8b5cd

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

KeyAsio.Gui/Windows/MainWindow.xaml.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ private void ForceClose()
313313

314314
private async void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
315315
{
316-
Title += $" {Updater.GetVersion()}";
316+
var version = Updater.GetVersion();
317+
FixCommit(ref version);
318+
Title += $" {version}";
317319

318320
if (_appSettings.Device == null)
319321
{
@@ -481,4 +483,16 @@ private void btnRealtimeOptions_OnClick(object sender, RoutedEventArgs e)
481483
};
482484
latencyGuideWindow.ShowDialog();
483485
}
486+
487+
private static void FixCommit(ref string version)
488+
{
489+
var lastIndexOf = version.LastIndexOf('+');
490+
if (lastIndexOf >= 0)
491+
{
492+
if (version.Length > lastIndexOf + 8)
493+
{
494+
version = version.Substring(0, lastIndexOf + 8);
495+
}
496+
}
497+
}
484498
}

0 commit comments

Comments
 (0)