From 0f79e5d95901c9290540d37bbcfdd0e0ece684c6 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Thu, 21 Dec 2017 03:29:46 +0100 Subject: [PATCH] Future proof version check Signed-off-by: Mario Danic --- .../talk/controllers/ServerSelectionController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java index 02d00d1f1..77286bf55 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java @@ -180,9 +180,12 @@ public class ServerSelectionController extends BaseController { .subscribe(status -> { String productName = getResources().getString(R.string.nc_server_product_name); + String versionString = status.getVersion().substring(0, status.getVersion().indexOf(".")); + int version = Integer.parseInt(versionString); + if (status.isInstalled() && !status.isMaintenance() && !status.isNeedsUpgrade() && - status.getVersion().startsWith("13.")) { + version >= 13) { getRouter().pushController(RouterTransaction.with( new WebViewLoginController(queryUrl.replace("/status.php", ""),