summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-05-08 11:46:11 +0200
committerParménides GV <parmegv@sdf.org>2014-05-08 11:46:11 +0200
commit00c185a7b6bfc727ff53b9a87620766e5adbb7b7 (patch)
tree6b0bf8c6982ef912ca77b6961489de2ac77127bb
parentdaff611c70bb5e8b3bdc5f5c42bc776acb6e8e3e (diff)
Cancelling a failed signup/login stops progressbar
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Dashboard.java9
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/LogInDialog.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java2
3 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
index f8db33f3..6f18b79a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
@@ -291,6 +291,15 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
EipServiceFragment eipFragment = (EipServiceFragment) getFragmentManager().findFragmentByTag(EipServiceFragment.TAG);
eipFragment.checkEipSwitch(false);
}
+
+ public void cancelLoginOrSignup() {
+ if(mProgressBar == null) mProgressBar = (ProgressBar) findViewById(R.id.eipProgress);
+ if(mProgressBar != null) {
+ mProgressBar.setVisibility(ProgressBar.GONE);
+ if(eipStatus == null) eipStatus = (TextView) findViewById(R.id.eipStatus);
+ if(eipStatus != null) eipStatus.setText("");
+ }
+ }
/**
* Asks ProviderAPI to log out.
diff --git a/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java b/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java
index a28c9049..da74958d 100644
--- a/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/LogInDialog.java
@@ -99,6 +99,7 @@ public class LogInDialog extends DialogFragment {
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
+ interface_with_Dashboard.cancelLoginOrSignup();
}
});
@@ -119,6 +120,7 @@ public class LogInDialog extends DialogFragment {
*/
public void authenticate(String username, String password);
public void cancelAuthedEipOn();
+ public void cancelLoginOrSignup();
}
LogInDialogInterface interface_with_Dashboard;
diff --git a/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java b/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java
index 601df843..2ba65c5d 100644
--- a/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/SignUpDialog.java
@@ -98,6 +98,7 @@ public class SignUpDialog extends DialogFragment {
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
+ interface_with_Dashboard.cancelLoginOrSignup();
}
});
@@ -118,6 +119,7 @@ public class SignUpDialog extends DialogFragment {
*/
public void signUp(String username, String password);
public void cancelAuthedEipOn();
+ public void cancelLoginOrSignup();
}
SignUpDialogInterface interface_with_Dashboard;