diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/ObjectivesPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/ObjectivesPlugin.java
index 8973ba3ac8..291b06372f 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/ObjectivesPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConstraintsObjectives/ObjectivesPlugin.java
@@ -26,6 +26,7 @@ import info.nightscout.androidaps.plugins.ConstraintsSafety.SafetyPlugin;
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.NSClientPlugin;
import info.nightscout.androidaps.plugins.PumpVirtual.VirtualPumpPlugin;
+import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
/**
@@ -129,7 +130,9 @@ public class ObjectivesPlugin extends PluginBase implements ConstraintsInterface
if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginType.APS))
apsEnabled = true;
- return new RequirementResult(hasBGData && bgIsAvailableInNS && pumpStatusIsAvailableInNS && NSClientPlugin.getPlugin().hasWritePermission() && LoopPlugin.getPlugin().isEnabled(PluginType.LOOP) && apsEnabled && vpUploadNeeded,
+ boolean profileSwitchExists = MainApp.getConfigBuilder().getProfileSwitchFromHistory(DateUtil.now()) != null;
+
+ return new RequirementResult(hasBGData && bgIsAvailableInNS && pumpStatusIsAvailableInNS && NSClientPlugin.getPlugin().hasWritePermission() && LoopPlugin.getPlugin().isEnabled(PluginType.LOOP) && apsEnabled && vpUploadNeeded && profileSwitchExists,
MainApp.gs(R.string.objectives_bgavailableinns) + ": " + yesOrNo(bgIsAvailableInNS)
+ "\n" + MainApp.gs(R.string.nsclienthaswritepermission) + ": " + yesOrNo(NSClientPlugin.getPlugin().hasWritePermission())
+ (isVirtualPump ? "\n" + MainApp.gs(R.string.virtualpump_uploadstatus_title) + ": " + yesOrNo(vpUploadEnabled) : "")
@@ -137,6 +140,7 @@ public class ObjectivesPlugin extends PluginBase implements ConstraintsInterface
+ "\n" + MainApp.gs(R.string.hasbgdata) + ": " + yesOrNo(hasBGData)
+ "\n" + MainApp.gs(R.string.loopenabled) + ": " + yesOrNo(LoopPlugin.getPlugin().isEnabled(PluginType.LOOP))
+ "\n" + MainApp.gs(R.string.apsselected) + ": " + yesOrNo(apsEnabled)
+ + "\n" + MainApp.gs(R.string.activate_profile) + ": " + yesOrNo(profileSwitchExists)
);
case 1:
return new RequirementResult(manualEnacts >= manualEnactsNeeded,
diff --git a/app/src/main/res/layout/nsprofile_fragment.xml b/app/src/main/res/layout/nsprofile_fragment.xml
index 0c1c40d1e4..6e9ca472d8 100644
--- a/app/src/main/res/layout/nsprofile_fragment.xml
+++ b/app/src/main/res/layout/nsprofile_fragment.xml
@@ -10,11 +10,6 @@
android:layout_gravity="center_horizontal"
android:layout_marginBottom="5dp" />
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index c2014a9082..71e1000cbb 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -570,7 +570,7 @@
Nepodporovaná verze Nightscoutu
Uploader
UPLD
- AKTIVOVAT PROFIL
+ Aktivovat profil
Zobrazovat prodloužený bolus v %
Datum
DIA %f je příliž krátké - použito %f !
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 90cf07d5fd..01de36c6f5 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -567,7 +567,7 @@
DIA von %f ist zu kurz - AAPS nutzt stattdessen %f!
Möglicherweise ungenau, wenn zum Befüllen ein Bolus verwendet wurde!
Verhältnis
- AKTIVIERE PROFIL
+ Aktiviere profil
Aktivitätsdauer
Aktivitätsziel
BZ-Messung
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3475ee7432..6da4c26248 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -664,7 +664,7 @@
Rapid-Acting Oref
Ultra-Rapid Oref
DIA of %f too short - using %f instead!
- ACTIVATE PROFILE
+ Activate profile
Date
INVALID
Waiting for pairing on pump