diff options
author | Victor Häggqvist <[email protected]> | 2015-10-10 20:55:13 +0200 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-10-10 20:55:13 +0200 |
commit | 4a1715015181195ab6ccd216d8632c8cfa62a7c9 (patch) | |
tree | b3464fcee96691ed5948872b46262948e6d596f3 /aboutit/src/main/java/com | |
parent | 39d3ece2103a7287292ac2146e38bd102d2ea186 (diff) |
fix: remove trailing - when no release name, closes #2
Diffstat (limited to '')
-rw-r--r-- | aboutit/src/main/java/com/snilius/aboutit/AboutIt.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java b/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java index 1a2195f..2bc29c1 100644 --- a/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java +++ b/aboutit/src/main/java/com/snilius/aboutit/AboutIt.java @@ -100,8 +100,11 @@ public class AboutIt { * @return baked version string */ public String getVersionString() { - releaseName = "-"+(releaseName != null?releaseName:(debug?"debug":"")); - return versionName+" ("+versionCode+releaseName+")"; + releaseName = "-" + (releaseName != null ? releaseName : (debug?"debug":"")); + if (releaseName.equals("-")) + return versionName+" ("+versionCode+")"; + else + return versionName+" ("+versionCode+releaseName+")"; } /** |