Skip to content

Commit

Permalink
show short commit hash in title, and just in case have a default stri…
Browse files Browse the repository at this point in the history
…ng in case of any errors with BuildConfig
  • Loading branch information
zoff99 committed Apr 19, 2024
1 parent 22c02d4 commit 0b2743c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,15 @@ private fun MainAppStart()

if (isOpen)
{
Window(onCloseRequest = { isAskingToClose = true }, title = "TRIfA - " + BuildConfig.APP_VERSION,
var win_title_addon = "Unknown Version"
try
{
win_title_addon = BuildConfig.APP_VERSION + " (" + BuildConfig.GIT_COMMIT_HASH.take(7) + ")"
}
catch(_: java.lang.Exception)
{}
Window(onCloseRequest = { isAskingToClose = true },
title = "TRIfA - " + win_title_addon,
icon = appIcon, state = state,
focusable = true,
onKeyEvent = {
Expand Down

0 comments on commit 0b2743c

Please sign in to comment.