aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/services/UpdateService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/services/UpdateService.java b/src/main/java/de/pixart/messenger/services/UpdateService.java
index 72c1b280a..e9671c814 100644
--- a/src/main/java/de/pixart/messenger/services/UpdateService.java
+++ b/src/main/java/de/pixart/messenger/services/UpdateService.java
@@ -81,19 +81,19 @@ public class UpdateService extends AsyncTask<String, Object, UpdateService.Wrapp
JSONObject json = new JSONObject(jsonString.toString());
if (json.getBoolean("success") && json.has("latestVersion") && json.has("appURI") && json.has("filesize")) {
String version = json.getString("latestVersion");
- String ownVersion = BuildConfig.VERSION_NAME;
+ String[] ownVersion = BuildConfig.VERSION_NAME.split("-");
String url = json.getString("appURI");
String filesize = json.getString("filesize");
String changelog = "";
if (json.has("changelog")) {
changelog = json.getString("changelog");
}
- if (checkVersion(version, ownVersion) >= 1) {
- Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion + " should be updated to " + version);
+ if (checkVersion(version, ownVersion[0]) >= 1) {
+ Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion[0] + " should be updated to " + version);
UpdateAvailable = true;
showNotification(url, changelog, version, filesize, store);
} else {
- Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion + " is up to date");
+ Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion[0] + " is up to date");
UpdateAvailable = false;
}
}