small fixes

This commit is contained in:
Milos Kozak 2021-03-01 23:37:14 +01:00
parent ae86cfea77
commit 06f35dc522
3 changed files with 4 additions and 4 deletions

View file

@ -271,7 +271,7 @@ class OpenHumansUploader @Inject constructor(
@JvmOverloads
fun enqueueTempTarget(tempTarget: TemporaryTarget?, deleted: Boolean = false) = tempTarget?.let {
insertQueueItem("TempTargets") {
put("date", tempTarget.dateCreated)
put("date", tempTarget.timestamp)
put("isValid", tempTarget.isValid)
put("nsId", tempTarget.interfaceIDs_backing?.nightscoutId)
put("low", tempTarget.lowTarget)

View file

@ -9,6 +9,7 @@ import info.nightscout.androidaps.R
import info.nightscout.androidaps.database.AppRepository
import info.nightscout.androidaps.database.ValueWrapper
import info.nightscout.androidaps.events.Event
import info.nightscout.androidaps.events.EventAutosensCalculationFinished
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.logging.AAPSLogger
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.data.AutosensData
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.sensitivity.SensitivityAAPSPlugin
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin
@ -297,7 +297,7 @@ class IobCobOref1Thread internal constructor(
@Suppress("SimplifyBooleanWithConstants")
if (false && sp.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)) {
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)
}
}

View file

@ -170,7 +170,7 @@ class TreatmentsTempTargetFragment : DaggerFragment() {
holder.binding.reason.text = tempTarget.reason.text
holder.binding.date.setTextColor(
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)
else -> holder.binding.reasonColon.currentTextColor
})