From ac62217984ccaf8ec3a090b97fe2b4a3987bc2af Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 29 Nov 2021 19:06:04 +0100 Subject: [PATCH] allow bolus update in NSC mode --- .../general/nsclient/NSClientAddUpdateWorker.kt | 5 ++++- .../database/transactions/SyncNsBolusTransaction.kt | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt index 209102ce2f..e6ff56ddf7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientAddUpdateWorker.kt @@ -98,7 +98,10 @@ class NSClientAddUpdateWorker( aapsLogger.debug(LTag.DATABASE, "Invalidated bolus $it") } result.updatedNsId.forEach { - aapsLogger.debug(LTag.DATABASE, "Updated nsId bolus $it") + aapsLogger.debug(LTag.DATABASE, "Updated nsId of bolus $it") + } + result.updated.forEach { + aapsLogger.debug(LTag.DATABASE, "Updated amount of bolus $it") } } } ?: aapsLogger.error("Error parsing bolus json $json") diff --git a/database/src/main/java/info/nightscout/androidaps/database/transactions/SyncNsBolusTransaction.kt b/database/src/main/java/info/nightscout/androidaps/database/transactions/SyncNsBolusTransaction.kt index 5c453a3673..9457f2d802 100644 --- a/database/src/main/java/info/nightscout/androidaps/database/transactions/SyncNsBolusTransaction.kt +++ b/database/src/main/java/info/nightscout/androidaps/database/transactions/SyncNsBolusTransaction.kt @@ -16,21 +16,27 @@ class SyncNsBolusTransaction(private val bolus: Bolus) : Transaction() val inserted = mutableListOf() val invalidated = mutableListOf() + val updated = mutableListOf() } } \ No newline at end of file