diff options
author | Parménides GV <parmegv@sdf.org> | 2014-12-22 12:26:42 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-12-22 12:26:42 +0100 |
commit | fab7a89f44d59f3c7ea7505ae05a3c8b4c67c0b8 (patch) | |
tree | bd505c296cad2a65241917306db8e233cac401aa /app/src/main | |
parent | d8fe17eecaff464b89d43a7ddc9bf0fb7013f761 (diff) | |
parent | 38cbf4b517e99961dc977db30ce8395ce10a7b0d (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/Dashboard.java | 4 | ||||
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/SessionDialog.java | 10 |
2 files changed, 7 insertions, 7 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 22e0f128..fd9ca851 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() { + /** + * @return a new instance of this DialogFragment. + */ + public static DialogFragment newInstance() { if(dialog == null) dialog = new SessionDialog(); return dialog; - } + } @Override public void onAttach(Activity activity) { |