From 0260b68fa8445a1631d61b1b857da1092534d5ef Mon Sep 17 00:00:00 2001 From: Andy Rozman Date: Mon, 30 Dec 2019 14:38:19 +0100 Subject: [PATCH] - fixes for init pod #44 --- .../omnipod/dialogs/wizard/initpod/InitActionFragment.java | 5 +++-- .../pump/omnipod/dialogs/wizard/initpod/InitActionPage.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionFragment.java index 649c4c0763..e224763caf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionFragment.java @@ -23,6 +23,7 @@ import com.tech.freak.wizardpager.ui.PageFragmentCallbacks; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.UUID; import info.nightscout.androidaps.R; import info.nightscout.androidaps.data.PumpEnactResult; @@ -218,7 +219,7 @@ public class InitActionFragment extends Fragment implements PodInitReceiver { mPage.setActionCompleted(isOk); - mPage.getData().putString(Page.SIMPLE_DATA_KEY, "ddd"); + mPage.getData().putString(Page.SIMPLE_DATA_KEY, UUID.randomUUID().toString()); mPage.notifyDataChanged(); }); @@ -228,7 +229,7 @@ public class InitActionFragment extends Fragment implements PodInitReceiver { public void setCheckBox(PodInitActionType podInitActionType, boolean isSuccess) { getActivity().runOnUiThread(() -> { - mapCheckBoxes.get(podInitActionType).setChecked(true); + mapCheckBoxes.get(podInitActionType).setChecked(isSuccess); mapCheckBoxes.get(podInitActionType).setTextColor(isSuccess ? Color.rgb(34, 135, 91) : Color.rgb(168, 36, 15)); }); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionPage.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionPage.java index f25e7c1a9c..8b34b99193 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionPage.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dialogs/wizard/initpod/InitActionPage.java @@ -48,7 +48,7 @@ public class InitActionPage extends Page { } public void setActionCompleted(boolean success) { - this.actionCompleted = true; + this.actionCompleted = success; this.actionSuccess = success; }