fix setting din in profile
This commit is contained in:
parent
e170503f82
commit
84cc4d0c00
|
@ -104,7 +104,8 @@ class ProfileFunctionImplementation @Inject constructor(
|
|||
timeshift = T.hours(timeShiftInHours.toLong()).msecs(),
|
||||
percentage = percentage,
|
||||
duration = T.mins(durationInMinutes.toLong()).msecs(),
|
||||
insulinConfiguration = activePlugin.activeInsulin.insulinConfiguration)
|
||||
insulinConfiguration = activePlugin.activeInsulin.insulinConfiguration.also { it.insulinEndTime = (pureProfile.dia * 3600 * 1000).toLong() }
|
||||
)
|
||||
disposable += repository.runTransactionForResult(InsertOrUpdateProfileSwitch(ps))
|
||||
.subscribe({ result ->
|
||||
result.inserted.forEach { aapsLogger.debug(LTag.DATABASE, "Inserted ProfileSwitch $it") }
|
||||
|
|
|
@ -15,7 +15,6 @@ import info.nightscout.androidaps.interfaces.Profile.Companion.secondsFromMidnig
|
|||
import info.nightscout.androidaps.interfaces.Profile.Companion.toMgdl
|
||||
import info.nightscout.androidaps.interfaces.Profile.ProfileValue
|
||||
import info.nightscout.androidaps.interfaces.Pump
|
||||
import info.nightscout.androidaps.interfaces.PumpDescription
|
||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
|
||||
|
@ -153,6 +152,7 @@ sealed class ProfileSealed(
|
|||
if (getIcTimeFromMidnight(seconds) != profile.getIcTimeFromMidnight(seconds)) return false
|
||||
if (getTargetLowMgdlTimeFromMidnight(seconds) != profile.getTargetLowMgdlTimeFromMidnight(seconds)) return false
|
||||
if (getTargetHighMgdlTimeFromMidnight(seconds) != profile.getTargetHighMgdlTimeFromMidnight(seconds)) return false
|
||||
if (dia != profile.dia) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue