small fixes
This commit is contained in:
parent
ae86cfea77
commit
06f35dc522
3 changed files with 4 additions and 4 deletions
|
@ -271,7 +271,7 @@ class OpenHumansUploader @Inject constructor(
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun enqueueTempTarget(tempTarget: TemporaryTarget?, deleted: Boolean = false) = tempTarget?.let {
|
fun enqueueTempTarget(tempTarget: TemporaryTarget?, deleted: Boolean = false) = tempTarget?.let {
|
||||||
insertQueueItem("TempTargets") {
|
insertQueueItem("TempTargets") {
|
||||||
put("date", tempTarget.dateCreated)
|
put("date", tempTarget.timestamp)
|
||||||
put("isValid", tempTarget.isValid)
|
put("isValid", tempTarget.isValid)
|
||||||
put("nsId", tempTarget.interfaceIDs_backing?.nightscoutId)
|
put("nsId", tempTarget.interfaceIDs_backing?.nightscoutId)
|
||||||
put("low", tempTarget.lowTarget)
|
put("low", tempTarget.lowTarget)
|
||||||
|
|
|
@ -9,6 +9,7 @@ import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.database.AppRepository
|
import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.ValueWrapper
|
import info.nightscout.androidaps.database.ValueWrapper
|
||||||
import info.nightscout.androidaps.events.Event
|
import info.nightscout.androidaps.events.Event
|
||||||
|
import info.nightscout.androidaps.events.EventAutosensCalculationFinished
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
|
@ -19,7 +20,6 @@ import info.nightscout.androidaps.plugins.general.overview.notifications.Notific
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin.Companion.roundUpTime
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin.Companion.roundUpTime
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensData
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensBgLoaded
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensBgLoaded
|
||||||
import info.nightscout.androidaps.events.EventAutosensCalculationFinished
|
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin
|
||||||
|
@ -297,7 +297,7 @@ class IobCobOref1Thread internal constructor(
|
||||||
@Suppress("SimplifyBooleanWithConstants")
|
@Suppress("SimplifyBooleanWithConstants")
|
||||||
if (false && sp.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)) {
|
if (false && sp.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)) {
|
||||||
val tempTarget = repository.getTemporaryTargetActiveAt(dateUtil._now()).blockingGet()
|
val tempTarget = repository.getTemporaryTargetActiveAt(dateUtil._now()).blockingGet()
|
||||||
if (tempTarget is ValueWrapper.Existing && tempTarget.value.target() >= 100) {
|
if (tempTarget is ValueWrapper.Existing && tempTarget.value.target() >= 100) {
|
||||||
autosensData.extraDeviation.add(-(tempTarget.value.target() - 100) / 20)
|
autosensData.extraDeviation.add(-(tempTarget.value.target() - 100) / 20)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,7 +170,7 @@ class TreatmentsTempTargetFragment : DaggerFragment() {
|
||||||
holder.binding.reason.text = tempTarget.reason.text
|
holder.binding.reason.text = tempTarget.reason.text
|
||||||
holder.binding.date.setTextColor(
|
holder.binding.date.setTextColor(
|
||||||
when {
|
when {
|
||||||
tempTarget === currentlyActiveTarget -> resourceHelper.gc(R.color.colorActive)
|
tempTarget.id == currentlyActiveTarget?.id -> resourceHelper.gc(R.color.colorActive)
|
||||||
tempTarget.timestamp > DateUtil.now() -> resourceHelper.gc(R.color.colorScheduled)
|
tempTarget.timestamp > DateUtil.now() -> resourceHelper.gc(R.color.colorScheduled)
|
||||||
else -> holder.binding.reasonColon.currentTextColor
|
else -> holder.binding.reasonColon.currentTextColor
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue