From 229285ed4d94df14e4edef52074add994093230c Mon Sep 17 00:00:00 2001 From: Andrei Vereha Date: Thu, 11 Nov 2021 17:41:19 +0100 Subject: [PATCH] display the performed operation --- .../info/nightscout/androidaps/queue/QueueThread.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.kt b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.kt index df3ce83881..c285b9d338 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.kt +++ b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.kt @@ -111,14 +111,18 @@ class QueueThread internal constructor( // Pickup 1st command and set performing variable if (queue.size() > 0) { queue.pickup() - if (queue.performing() != null) { - aapsLogger.debug(LTag.PUMPQUEUE, "performing " + queue.performing()?.status()) + val cont = queue.performing()?.let { + aapsLogger.debug(LTag.PUMPQUEUE, "performing " + it.status()) rxBus.send(EventQueueChanged()) - queue.performing()?.execute() + rxBus.send(EventPumpStatusChanged(it.status())) + it.execute() queue.resetPerforming() rxBus.send(EventQueueChanged()) lastCommandTime = System.currentTimeMillis() SystemClock.sleep(100) + true + } ?: false + if (cont) { continue } }