From 9c40e4af34cadc421818a626d658e88493e9521a Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sun, 1 Jan 2017 21:46:25 +0100 Subject: [PATCH] Dismiss editing when fragment is paused --- .../CircadianPercentageProfileFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java index 0bf490abb6..a9afb13bbb 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/CircadianPercentageProfile/CircadianPercentageProfileFragment.java @@ -344,6 +344,12 @@ public class CircadianPercentageProfileFragment extends Fragment implements Frag @Override public void onPause() { super.onPause(); + + if (basalEditDialog != null && basalEditDialog.isVisible()) { + basalEditDialog.dismiss(); + } + basalEditDialog = null; + MainApp.bus().unregister(this); }