aboutsummaryrefslogtreecommitdiff
path: root/aboutit/src/main/java/com/snilius
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-10-10 20:55:13 +0200
committerVictor Häggqvist <[email protected]>2015-10-10 20:55:13 +0200
commit4a1715015181195ab6ccd216d8632c8cfa62a7c9 (patch)
treeb3464fcee96691ed5948872b46262948e6d596f3 /aboutit/src/main/java/com/snilius
parent39d3ece2103a7287292ac2146e38bd102d2ea186 (diff)
fix: remove trailing - when no release name, closes #2
Diffstat (limited to '')
-rw-r--r--aboutit/src/main/java/com/snilius/aboutit/AboutIt.java7
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+")";
}
/**