show notification only once and if there is no CommandDeactivatePod in progress
This commit is contained in:
parent
54b8d0613c
commit
88b4830a0c
|
@ -342,15 +342,16 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
aapsLogger.info(LTag.PUMP, "syncBolusWithPumpId on CANCEL_BOLUS returned: $sync")
|
||||
}
|
||||
}
|
||||
|
||||
podStateManager.alarmType?.let {
|
||||
showNotification(
|
||||
Notification.OMNIPOD_POD_FAULT,
|
||||
it.toString(),
|
||||
Notification.URGENT,
|
||||
R.raw.boluserror
|
||||
)
|
||||
if (!podStateManager.alarmSynced) {
|
||||
if (!podStateManager.alarmSynced) {
|
||||
podStateManager.alarmType?.let {
|
||||
if (!commandQueue.isCustomCommandInQueue(CommandDeactivatePod::class.java)) {
|
||||
showNotification(
|
||||
Notification.OMNIPOD_POD_FAULT,
|
||||
it.toString(),
|
||||
Notification.URGENT,
|
||||
R.raw.boluserror
|
||||
)
|
||||
}
|
||||
pumpSync.insertAnnouncement(
|
||||
error = it.toString(),
|
||||
pumpId = Random.Default.nextLong(),
|
||||
|
|
Loading…
Reference in a new issue