diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesFragment.java index 1cfca7a407..a6b866fc77 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesFragment.java @@ -112,7 +112,7 @@ public class ObjectivesFragment extends Fragment implements View.OnClickListener holder.progressLayout.setVisibility(View.GONE); holder.verifyLayout.setVisibility(View.GONE); holder.started.setVisibility(View.GONE); - } else if (o.started.getTime() > 0 && !enableFake.isChecked() && o.accomplished.getTime() == 0 && o.started.getTime() + o.durationInDays * 24 * 60 * 60 * 1000 > now && !requirementsMet.done) { + } else if (o.started.getTime() > 0 && !enableFake.isChecked() && o.accomplished.getTime() == 0 && !(o.started.getTime() + o.durationInDays * 24 * 60 * 60 * 1000 < now && requirementsMet.done)) { // Phase 2: started, waiting for duration and met requirements holder.startButton.setEnabled(false); holder.verifyLayout.setVisibility(View.GONE); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesPlugin.java index 3aeb44125a..e981848ccc 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Objectives/ObjectivesPlugin.java @@ -126,7 +126,7 @@ public class ObjectivesPlugin implements PluginBase, ConstraintsInterface { case 2: return new RequirementResult(true, ""); default: - return new RequirementResult(false, ""); + return new RequirementResult(true, ""); } }