summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Dashboard.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/SessionDialog.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
index e32dbdee..52b22695 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
@@ -329,7 +329,7 @@ public class Dashboard extends Activity implements SessionDialog.SessionDialogIn
FragmentTransaction transaction = fragment_manager.removePreviousFragment(SessionDialog.TAG);
DialogFragment newFragment = SessionDialog.newInstance();
- if(resultData != null && !resultData.isEmpty())
+ if(resultData != null && !resultData.isEmpty() && fragment_manager.findFragmentByTag(SessionDialog.TAG) == null)
newFragment.setArguments(resultData);
newFragment.show(transaction, SessionDialog.TAG);
}
@@ -378,7 +378,7 @@ public class Dashboard extends Activity implements SessionDialog.SessionDialogIn
FragmentTransaction transaction = fragment_manager.removePreviousFragment(SessionDialog.TAG);
DialogFragment newFragment = SessionDialog.newInstance();
- if(resultData != null && !resultData.isEmpty()) {
+ if(resultData != null && !resultData.isEmpty() && fragment_manager.findFragmentByTag(SessionDialog.TAG) == null) {
newFragment.setArguments(resultData);
}
newFragment.show(transaction, SessionDialog.TAG);
diff --git a/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java b/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java
index a8226d30..fd9ca851 100644
--- a/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java
@@ -133,8 +133,8 @@ public class SessionDialog extends DialogFragment{
* @return a new instance of this DialogFragment.
*/
public static DialogFragment newInstance() {
- if(dialog == null || dialog.getArguments() != null)
- dialog = new SessionDialog();
+ if(dialog == null)
+ dialog = new SessionDialog();
return dialog;
}