Merge pull request #487 from Philoul/uel.log_BolusCancel
Add uel.log for Cancel Bolus Button
This commit is contained in:
commit
0731ccb6d4
|
@ -11,10 +11,13 @@ import dagger.android.support.DaggerDialogFragment
|
|||
import info.nightscout.androidaps.activities.BolusProgressHelperActivity
|
||||
import info.nightscout.androidaps.core.R
|
||||
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.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.logging.UserEntryLogger
|
||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
|
||||
|
@ -32,6 +35,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
|
|||
@Inject lateinit var commandQueue: CommandQueueProvider
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
@Inject lateinit var uel: UserEntryLogger
|
||||
|
||||
private val disposable = CompositeDisposable()
|
||||
|
||||
|
@ -87,6 +91,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
|
|||
stopPressed = true
|
||||
binding.stoppressed.visibility = View.VISIBLE
|
||||
binding.stop.visibility = View.INVISIBLE
|
||||
uel.log(Action.CANCEL_BOLUS, Sources.Overview, state)
|
||||
commandQueue.cancelAllBoluses()
|
||||
}
|
||||
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.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_BOLUS -> resourceHelper.gs(R.string.uel_cancel_bolus)
|
||||
Action.CANCEL_EXTENDED_BOLUS -> resourceHelper.gs(R.string.uel_cancel_extended_bolus)
|
||||
Action.CANCEL_TT -> resourceHelper.gs(R.string.uel_cancel_tt)
|
||||
Action.CAREPORTAL -> resourceHelper.gs(R.string.uel_careportal)
|
||||
|
|
|
@ -31,6 +31,7 @@ class UserEntryMapper {
|
|||
CLEAR_PAIRING_KEYS (UserEntry.Action.CLEAR_PAIRING_KEYS),
|
||||
ACCEPTS_TEMP_BASAL (UserEntry.Action.ACCEPTS_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_TT (UserEntry.Action.CANCEL_TT),
|
||||
CAREPORTAL (UserEntry.Action.CAREPORTAL),
|
||||
|
|
|
@ -97,7 +97,7 @@ class UserEntryPresentationHelper @Inject constructor(
|
|||
Sources.Food -> R.drawable.ic_food
|
||||
Sources.Stats -> R.drawable.ic_cp_stats
|
||||
Sources.ConfigBuilder -> R.drawable.ic_cogs
|
||||
Sources.Overview -> R.drawable.ic_notif_aaps
|
||||
Sources.Overview -> R.drawable.ic_home
|
||||
Sources.Aaps -> R.drawable.ic_notif_aaps
|
||||
Sources.Unknown -> R.drawable.ic_generic_icon
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ class UserEntryPresentationHelper @Inject constructor(
|
|||
val fullvalueWithUnitList = ArrayList<ValueWithUnit?>(entry.values)
|
||||
var timestampRec = "" + entry.timestamp
|
||||
var dateTimestampRev = dateUtil.dateAndTimeAndSecondsString(entry.timestamp)
|
||||
var utcOffset = dateUtil.timeString(entry.utcOffset)
|
||||
var utcOffset = dateUtil.timeStringFromSeconds((entry.utcOffset/1000).toInt())
|
||||
var action = csvString(entry.action)
|
||||
var therapyEvent = ""
|
||||
var source = translator.translate(entry.source)
|
||||
|
|
|
@ -433,6 +433,7 @@
|
|||
<string name="uel_clear_pairing_keys">CLEAR PAIRING KEYS</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_bolus">CANCEL BOLUS</string>
|
||||
<string name="uel_cancel_extended_bolus">CANCEL EXTENDED BOLUS</string>
|
||||
<string name="uel_cancel_tt">CANCEL TT</string>
|
||||
<string name="uel_careportal">CAREPORTAL</string>
|
||||
|
|
|
@ -46,6 +46,7 @@ data class UserEntry(
|
|||
CLEAR_PAIRING_KEYS (ColorGroup.Pump),
|
||||
ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||
CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment),
|
||||
CANCEL_BOLUS (ColorGroup.InsulinTreatment),
|
||||
CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment),
|
||||
CANCEL_TT (ColorGroup.TT),
|
||||
CAREPORTAL (ColorGroup.Careportal),
|
||||
|
|
Loading…
Reference in a new issue