- fixes for init pod #44

This commit is contained in:
Andy Rozman 2019-12-30 14:38:19 +01:00
parent 54464cf2b6
commit 0260b68fa8
2 changed files with 4 additions and 3 deletions

View file

@ -23,6 +23,7 @@ import com.tech.freak.wizardpager.ui.PageFragmentCallbacks;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID;
import info.nightscout.androidaps.R; import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.data.PumpEnactResult;
@ -218,7 +219,7 @@ public class InitActionFragment extends Fragment implements PodInitReceiver {
mPage.setActionCompleted(isOk); mPage.setActionCompleted(isOk);
mPage.getData().putString(Page.SIMPLE_DATA_KEY, "ddd"); mPage.getData().putString(Page.SIMPLE_DATA_KEY, UUID.randomUUID().toString());
mPage.notifyDataChanged(); mPage.notifyDataChanged();
}); });
@ -228,7 +229,7 @@ public class InitActionFragment extends Fragment implements PodInitReceiver {
public void setCheckBox(PodInitActionType podInitActionType, boolean isSuccess) { public void setCheckBox(PodInitActionType podInitActionType, boolean isSuccess) {
getActivity().runOnUiThread(() -> { getActivity().runOnUiThread(() -> {
mapCheckBoxes.get(podInitActionType).setChecked(true); mapCheckBoxes.get(podInitActionType).setChecked(isSuccess);
mapCheckBoxes.get(podInitActionType).setTextColor(isSuccess ? Color.rgb(34, 135, 91) : mapCheckBoxes.get(podInitActionType).setTextColor(isSuccess ? Color.rgb(34, 135, 91) :
Color.rgb(168, 36, 15)); Color.rgb(168, 36, 15));
}); });

View file

@ -48,7 +48,7 @@ public class InitActionPage extends Page {
} }
public void setActionCompleted(boolean success) { public void setActionCompleted(boolean success) {
this.actionCompleted = true; this.actionCompleted = success;
this.actionSuccess = success; this.actionSuccess = success;
} }