Add uel.log for Cancel Bolus Button
This commit is contained in:
parent
430a871993
commit
0b928c3140
5 changed files with 9 additions and 0 deletions
|
@ -11,10 +11,13 @@ import dagger.android.support.DaggerDialogFragment
|
||||||
import info.nightscout.androidaps.activities.BolusProgressHelperActivity
|
import info.nightscout.androidaps.activities.BolusProgressHelperActivity
|
||||||
import info.nightscout.androidaps.core.R
|
import info.nightscout.androidaps.core.R
|
||||||
import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding
|
import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Action
|
||||||
|
import info.nightscout.androidaps.database.entities.UserEntry.Sources
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
import info.nightscout.androidaps.events.EventPumpStatusChanged
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
|
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
|
||||||
|
@ -32,6 +35,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
|
||||||
@Inject lateinit var commandQueue: CommandQueueProvider
|
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||||
|
@Inject lateinit var uel: UserEntryLogger
|
||||||
|
|
||||||
private val disposable = CompositeDisposable()
|
private val disposable = CompositeDisposable()
|
||||||
|
|
||||||
|
@ -87,6 +91,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
|
||||||
stopPressed = true
|
stopPressed = true
|
||||||
binding.stoppressed.visibility = View.VISIBLE
|
binding.stoppressed.visibility = View.VISIBLE
|
||||||
binding.stop.visibility = View.INVISIBLE
|
binding.stop.visibility = View.INVISIBLE
|
||||||
|
uel.log(Action.CANCEL_BOLUS, Sources.Overview, state)
|
||||||
commandQueue.cancelAllBoluses()
|
commandQueue.cancelAllBoluses()
|
||||||
}
|
}
|
||||||
val defaultState = resourceHelper.gs(R.string.waitingforpump)
|
val defaultState = resourceHelper.gs(R.string.waitingforpump)
|
||||||
|
|
|
@ -46,6 +46,7 @@ class Translator @Inject internal constructor(
|
||||||
Action.CLEAR_PAIRING_KEYS -> resourceHelper.gs(R.string.uel_clear_pairing_keys)
|
Action.CLEAR_PAIRING_KEYS -> resourceHelper.gs(R.string.uel_clear_pairing_keys)
|
||||||
Action.ACCEPTS_TEMP_BASAL -> resourceHelper.gs(R.string.uel_accepts_temp_basal)
|
Action.ACCEPTS_TEMP_BASAL -> resourceHelper.gs(R.string.uel_accepts_temp_basal)
|
||||||
Action.CANCEL_TEMP_BASAL -> resourceHelper.gs(R.string.uel_cancel_temp_basal)
|
Action.CANCEL_TEMP_BASAL -> resourceHelper.gs(R.string.uel_cancel_temp_basal)
|
||||||
|
Action.CANCEL_BOLUS -> resourceHelper.gs(R.string.uel_cancel_bolus)
|
||||||
Action.CANCEL_EXTENDED_BOLUS -> resourceHelper.gs(R.string.uel_cancel_extended_bolus)
|
Action.CANCEL_EXTENDED_BOLUS -> resourceHelper.gs(R.string.uel_cancel_extended_bolus)
|
||||||
Action.CANCEL_TT -> resourceHelper.gs(R.string.uel_cancel_tt)
|
Action.CANCEL_TT -> resourceHelper.gs(R.string.uel_cancel_tt)
|
||||||
Action.CAREPORTAL -> resourceHelper.gs(R.string.uel_careportal)
|
Action.CAREPORTAL -> resourceHelper.gs(R.string.uel_careportal)
|
||||||
|
|
|
@ -31,6 +31,7 @@ class UserEntryMapper {
|
||||||
CLEAR_PAIRING_KEYS (UserEntry.Action.CLEAR_PAIRING_KEYS),
|
CLEAR_PAIRING_KEYS (UserEntry.Action.CLEAR_PAIRING_KEYS),
|
||||||
ACCEPTS_TEMP_BASAL (UserEntry.Action.ACCEPTS_TEMP_BASAL),
|
ACCEPTS_TEMP_BASAL (UserEntry.Action.ACCEPTS_TEMP_BASAL),
|
||||||
CANCEL_TEMP_BASAL (UserEntry.Action.CANCEL_TEMP_BASAL),
|
CANCEL_TEMP_BASAL (UserEntry.Action.CANCEL_TEMP_BASAL),
|
||||||
|
CANCEL_BOLUS (UserEntry.Action.CANCEL_BOLUS),
|
||||||
CANCEL_EXTENDED_BOLUS (UserEntry.Action.CANCEL_EXTENDED_BOLUS),
|
CANCEL_EXTENDED_BOLUS (UserEntry.Action.CANCEL_EXTENDED_BOLUS),
|
||||||
CANCEL_TT (UserEntry.Action.CANCEL_TT),
|
CANCEL_TT (UserEntry.Action.CANCEL_TT),
|
||||||
CAREPORTAL (UserEntry.Action.CAREPORTAL),
|
CAREPORTAL (UserEntry.Action.CAREPORTAL),
|
||||||
|
|
|
@ -433,6 +433,7 @@
|
||||||
<string name="uel_clear_pairing_keys">CLEAR PAIRING KEYS</string>
|
<string name="uel_clear_pairing_keys">CLEAR PAIRING KEYS</string>
|
||||||
<string name="uel_accepts_temp_basal">ACCEPTS TEMP BASAL</string>
|
<string name="uel_accepts_temp_basal">ACCEPTS TEMP BASAL</string>
|
||||||
<string name="uel_cancel_temp_basal">CANCEL TEMP BASAL</string>
|
<string name="uel_cancel_temp_basal">CANCEL TEMP BASAL</string>
|
||||||
|
<string name="uel_cancel_bolus">CANCEL BOLUS</string>
|
||||||
<string name="uel_cancel_extended_bolus">CANCEL EXTENDED BOLUS</string>
|
<string name="uel_cancel_extended_bolus">CANCEL EXTENDED BOLUS</string>
|
||||||
<string name="uel_cancel_tt">CANCEL TT</string>
|
<string name="uel_cancel_tt">CANCEL TT</string>
|
||||||
<string name="uel_careportal">CAREPORTAL</string>
|
<string name="uel_careportal">CAREPORTAL</string>
|
||||||
|
|
|
@ -46,6 +46,7 @@ data class UserEntry(
|
||||||
CLEAR_PAIRING_KEYS (ColorGroup.Pump),
|
CLEAR_PAIRING_KEYS (ColorGroup.Pump),
|
||||||
ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment),
|
ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||||
CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment),
|
CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||||
|
CANCEL_BOLUS (ColorGroup.InsulinTreatment),
|
||||||
CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment),
|
CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment),
|
||||||
CANCEL_TT (ColorGroup.TT),
|
CANCEL_TT (ColorGroup.TT),
|
||||||
CAREPORTAL (ColorGroup.Careportal),
|
CAREPORTAL (ColorGroup.Careportal),
|
||||||
|
|
Loading…
Reference in a new issue