Add extra check
This commit is contained in:
parent
e9944e3b9c
commit
103333dee1
1 changed files with 13 additions and 11 deletions
|
@ -247,6 +247,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
|
|
||||||
if (podStateManager.hasPodState()) {
|
if (podStateManager.hasPodState()) {
|
||||||
AlertSet activeAlerts = podStateManager.getActiveAlerts();
|
AlertSet activeAlerts = podStateManager.getActiveAlerts();
|
||||||
|
if (activeAlerts != null) {
|
||||||
if (aapsOmnipodManager.isAutomaticallyAcknowledgeAlertsEnabled() && activeAlerts.size() > 0 && !getCommandQueue().isCustomCommandInQueue(CommandAcknowledgeAlerts.class)) {
|
if (aapsOmnipodManager.isAutomaticallyAcknowledgeAlertsEnabled() && activeAlerts.size() > 0 && !getCommandQueue().isCustomCommandInQueue(CommandAcknowledgeAlerts.class)) {
|
||||||
String alerts = TextUtils.join(", ", aapsOmnipodUtil.getTranslatedActiveAlerts(podStateManager));
|
String alerts = TextUtils.join(", ", aapsOmnipodUtil.getTranslatedActiveAlerts(podStateManager));
|
||||||
getCommandQueue().customCommand(new CommandAcknowledgeAlerts(), new Callback() {
|
getCommandQueue().customCommand(new CommandAcknowledgeAlerts(), new Callback() {
|
||||||
|
@ -262,6 +263,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
doPodCheck();
|
doPodCheck();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue