From deb2cfdeb174822e5550924ac1000f30d948c1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 22 Dec 2014 11:45:56 +0100 Subject: New SessionDialog if any argument previously --- app/src/main/java/se/leap/bitmaskclient/SessionDialog.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java b/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java index 22e0f128..a8226d30 100644 --- a/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java @@ -129,15 +129,15 @@ public class SessionDialog extends DialogFragment{ SessionDialogInterface interface_with_Dashboard; - /** - * @return a new instance of this DialogFragment. - */ - public static DialogFragment newInstance() { - if(dialog == null) - dialog = new SessionDialog(); + /** + * @return a new instance of this DialogFragment. + */ + public static DialogFragment newInstance() { + if(dialog == null || dialog.getArguments() != null) + dialog = new SessionDialog(); return dialog; - } + } @Override public void onAttach(Activity activity) { -- cgit v1.2.3