From 0123aa2cc1e6ad6a2ff96b0b487debfa334c991c Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Tue, 16 Jan 2018 21:17:23 +0100 Subject: [PATCH] Fix provider text visibility Signed-off-by: Mario Danic --- .../talk/controllers/ServerSelectionController.java | 13 +++++++++---- .../main/res/layout/controller_server_selection.xml | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) 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 ff0cd953b..1b4f21121 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ServerSelectionController.java @@ -204,7 +204,9 @@ public class ServerSelectionController extends BaseController { serverEntry.setEnabled(false); progressBar.setVisibility(View.VISIBLE); - providersTextView.setVisibility(View.INVISIBLE); + if (providersTextView.getVisibility() != View.GONE) { + providersTextView.setVisibility(View.INVISIBLE); + } if (url.endsWith("/")) { url = url.substring(0, url.length() - 1); @@ -228,7 +230,6 @@ public class ServerSelectionController extends BaseController { String versionString = status.getVersion().substring(0, status.getVersion().indexOf(".")); int version = Integer.parseInt(versionString); - if (status.isInstalled() && !status.isMaintenance() && !status.isNeedsUpgrade() && version >= 13) { @@ -278,14 +279,18 @@ public class ServerSelectionController extends BaseController { } progressBar.setVisibility(View.INVISIBLE); - providersTextView.setVisibility(View.VISIBLE); + if (providersTextView.getVisibility() != View.GONE) { + providersTextView.setVisibility(View.VISIBLE); + } toggleProceedButton(false); dispose(); } }, () -> { progressBar.setVisibility(View.INVISIBLE); - providersTextView.setVisibility(View.VISIBLE); + if (providersTextView.getVisibility() != View.GONE) { + providersTextView.setVisibility(View.VISIBLE); + } dispose(); }); } diff --git a/app/src/main/res/layout/controller_server_selection.xml b/app/src/main/res/layout/controller_server_selection.xml index 735fcf049..5dc0ca0bf 100644 --- a/app/src/main/res/layout/controller_server_selection.xml +++ b/app/src/main/res/layout/controller_server_selection.xml @@ -32,14 +32,14 @@ android:layout_height="96dp" android:layout_centerHorizontal="true" android:layout_marginBottom="36dp" - android:layout_marginTop="108dp" + android:layout_marginTop="92dp" android:scaleType="fitXY" app:srcCompat="@drawable/ic_logo"/>