Browse Source

Fix settings client cert text

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 years ago
parent
commit
47b5c66f8f

+ 6 - 4
app/src/main/java/com/nextcloud/talk/controllers/SettingsController.java

@@ -230,10 +230,6 @@ public class SettingsController extends BaseController {
                     .popChangeHandler(new VerticalChangeHandler()));
         });
 
-        if (userEntity.getClientCertificate() != null) {
-            certificateSetup.setTitle(R.string.nc_client_cert_change);
-        }
-
 
         String host = null;
         int port = -1;
@@ -281,6 +277,12 @@ public class SettingsController extends BaseController {
         dispose(null);
         userEntity = userUtils.getCurrentUser();
 
+        if (!TextUtils.isEmpty(userEntity.getClientCertificate())) {
+            certificateSetup.setTitle(R.string.nc_client_cert_change);
+        } else {
+            certificateSetup.setTitle(R.string.nc_client_cert_setup);
+        }
+
         if ("No proxy".equals(appPreferences.getProxyType()) || appPreferences.getProxyType() == null) {
             hideProxySettings();
         } else {