1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-04 23:05:48 +02:00

about-dialog: only show the project versions if available

This is a workaround for an issue that occurs due to the way Linux
packaging is done, where the git repository is not available in the
build source at configure time, which is when the version files are
generated, so we prevent a "." from being displayed if the version
string is not available.

Gitlab: #1857
Change-Id: I2f6a281eb89ec0f977749d135da68fe5b7c9c2da
This commit is contained in:
Andreas Traczyk 2024-10-31 17:20:01 -04:00
parent 2f163846c7
commit fb660b928f

View file

@ -104,8 +104,20 @@ BaseModalDialog {
font.pixelSize: JamiTheme.textFontSize font.pixelSize: JamiTheme.textFontSize
padding: 0 padding: 0
readonly property bool isBeta: AppVersionManager.isCurrentVersionBeta() readonly property bool isBeta: AppVersionManager.isCurrentVersionBeta()
text: JamiStrings.buildID + ": " + UtilsAdapter.getBuildIDStr() + "\n" + text: {
JamiStrings.version + ": " + (isBeta ? "(Beta) " : "") + UtilsAdapter.getVersionStr() // HACK: Only display the version string if it has been constructed properly.
// This is a workaround for an issue that occurs due to the way Linux
// packaging is done, where the git repository is not available in the
// build source at configure time, which is when the version files are
// generated, so we prevent a "." from being displayed if the version
// string is not available.
var contentStr = JamiStrings.buildID + ": " + UtilsAdapter.getBuildIDStr();
const versionStr = UtilsAdapter.getVersionStr()
if (versionStr.length > 1) {
contentStr += "\n" + JamiStrings.version + ": " + (isBeta ? "(Beta) " : "") + versionStr
}
return contentStr
}
selectByMouse: true selectByMouse: true
readOnly: true readOnly: true