Merge pull request #916 from 0pen-dash/avereha/fix-alarm

Dash alarms: fix notification
This commit is contained in:
Milos Kozak 2021-11-14 17:01:32 +01:00 committed by GitHub
commit c5599ee9b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(),