Skip to content

Commit

Permalink
Fix title
Browse files Browse the repository at this point in the history
Milkitic committed Dec 31, 2023
1 parent d94ab10 commit da8b5cd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion KeyAsio.Gui/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -313,7 +313,9 @@ private void ForceClose()

private async void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
{
Title += $" {Updater.GetVersion()}";
var version = Updater.GetVersion();
FixCommit(ref version);
Title += $" {version}";

if (_appSettings.Device == null)
{
@@ -481,4 +483,16 @@ private void btnRealtimeOptions_OnClick(object sender, RoutedEventArgs e)
};
latencyGuideWindow.ShowDialog();
}

private static void FixCommit(ref string version)
{
var lastIndexOf = version.LastIndexOf('+');
if (lastIndexOf >= 0)
{
if (version.Length > lastIndexOf + 8)
{
version = version.Substring(0, lastIndexOf + 8);
}
}
}
}

0 comments on commit da8b5cd

Please sign in to comment.