diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java index bc2c0adb86..d3ce1e7b7a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Actions/ActionsFragment.java @@ -82,7 +82,7 @@ public class ActionsFragment extends Fragment implements View.OnClickListener { tempBasal.setOnClickListener(this); fill.setOnClickListener(this); - updateGUIIfVisible(); + updateGUI(); return view; } @@ -96,29 +96,30 @@ public class ActionsFragment extends Fragment implements View.OnClickListener { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe public void onStatusEvent(final EventInitializationChanged ev) { - updateGUIIfVisible(); + updateGUI(); } @Subscribe public void onStatusEvent(final EventRefreshOverview ev) { - updateGUIIfVisible(); + updateGUI(); } @Subscribe public void onStatusEvent(final EventExtendedBolusChange ev) { - updateGUIIfVisible(); + updateGUI(); } @Subscribe public void onStatusEvent(final EventTempBasalChange ev) { - updateGUIIfVisible(); + updateGUI(); } - void updateGUIIfVisible() { + private void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java index abc67c4c39..16e9441211 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/CareportalFragment.java @@ -188,6 +188,7 @@ public class CareportalFragment extends Fragment implements View.OnClickListener public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe @@ -195,7 +196,7 @@ public class CareportalFragment extends Fragment implements View.OnClickListener updateGUI(); } - void updateGUI() { + private void updateGUI() { Activity activity = getActivity(); updateAge(activity, sage, iage, cage, pbage); } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java index de295d8a6e..143cbe617b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Loop/LoopFragment.java @@ -71,6 +71,7 @@ public class LoopFragment extends Fragment implements View.OnClickListener { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Override @@ -110,7 +111,7 @@ public class LoopFragment extends Fragment implements View.OnClickListener { } - void updateGUI() { + private void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java index c480ebfe3c..22071e4ae1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSAMA/OpenAPSAMAFragment.java @@ -91,6 +91,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe @@ -103,7 +104,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener updateResultGUI(ev.text); } - void updateGUI() { + private void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java index 16249dffc3..867f63e182 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/OpenAPSMA/OpenAPSMAFragment.java @@ -85,6 +85,7 @@ public class OpenAPSMAFragment extends Fragment implements View.OnClickListener public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java index f765fe6ed1..743ef7cb58 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ProfileNS/NSProfileFragment.java @@ -60,6 +60,7 @@ public class NSProfileFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java index 1780b1a53f..437043c887 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaR/DanaRFragment.java @@ -166,6 +166,7 @@ public class DanaRFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java index 02e7e5ba24..adca7e91a3 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRKorean/DanaRKoreanFragment.java @@ -164,6 +164,7 @@ public class DanaRKoreanFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java index 9e87d45dca..d443746e5a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpDanaRv2/DanaRv2Fragment.java @@ -163,6 +163,7 @@ public class DanaRv2Fragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java index f1e709e329..bb639d30f1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpVirtual/VirtualPumpFragment.java @@ -73,6 +73,7 @@ public class VirtualPumpFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java index 83973e83ff..1ec0239f83 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/SmsCommunicator/SmsCommunicatorFragment.java @@ -66,6 +66,7 @@ public class SmsCommunicatorFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java index 0acbf4b2c5..17836e081b 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsExtendedBolusesFragment.java @@ -193,6 +193,7 @@ public class TreatmentsExtendedBolusesFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java index 344abd8346..8a8866fa4d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsProfileSwitchFragment.java @@ -190,6 +190,7 @@ public class TreatmentsProfileSwitchFragment extends Fragment implements View.On public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe @@ -197,7 +198,7 @@ public class TreatmentsProfileSwitchFragment extends Fragment implements View.On updateGUI(); } - void updateGUI() { + private void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java index 7a74ca4a86..4a465840d6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTempTargetFragment.java @@ -211,6 +211,7 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe @@ -218,7 +219,7 @@ public class TreatmentsTempTargetFragment extends Fragment implements View.OnCli updateGUI(); } - void updateGUI() { + private void updateGUI() { Activity activity = getActivity(); if (activity != null) activity.runOnUiThread(new Runnable() { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java index 8db8a9c67b..bcd544c3ab 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/fragments/TreatmentsTemporaryBasalsFragment.java @@ -212,6 +212,7 @@ public class TreatmentsTemporaryBasalsFragment extends Fragment { public void onResume() { super.onResume(); MainApp.bus().register(this); + updateGUI(); } @Subscribe