浏览代码

fix #1938

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 7 年之前
父节点
当前提交
48f991663d
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java

+ 5 - 5
src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java

@@ -112,11 +112,12 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
 
         positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
         positiveButton.setTextColor(color);
-        positiveButton.setVisibility(View.INVISIBLE);
 
         negativeButton = alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE);
         negativeButton.setTextColor(color);
-        negativeButton.setVisibility(View.INVISIBLE);
+
+        task = new DownloadKeysAsyncTask();
+        task.execute();
     }
 
     @Override
@@ -222,9 +223,6 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
             }
         });
 
-        task = new DownloadKeysAsyncTask();
-        task.execute();
-
         return dialog;
     }
 
@@ -234,6 +232,8 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
             super.onPreExecute();
 
             textView.setText(R.string.end_to_end_encryption_retrieving_keys);
+            positiveButton.setVisibility(View.INVISIBLE);
+            negativeButton.setVisibility(View.INVISIBLE);
         }
 
         @Override