diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-12-07 20:14:45 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-12-07 20:14:45 +0100 |
commit | a80432f67110053ef6c638ea64a55ee9390f4951 (patch) | |
tree | 54f3a237f6dbf5ab58d2ffc07781a4a92f1f8594 | |
parent | 348498b875ee0145a12f052b5b661cd4e42961ad (diff) |
fix updater
-rw-r--r-- | src/main/java/de/pixart/messenger/services/UpdateService.java | 8 |
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; } } |