Future proof version check

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-12-21 03:29:46 +01:00
parent 9b2e95c4d5
commit 0f79e5d959

View file

@ -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", ""),