fix clash comming from RS history
This commit is contained in:
parent
d66d362aa3
commit
a08c1d5269
|
@ -308,6 +308,9 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
|
|||
//preserve carbs
|
||||
if (existingTreatment.isValid && existingTreatment.carbs > 0 && treatment.carbs == 0) {
|
||||
treatment.carbs = existingTreatment.carbs;
|
||||
// preserve insulin
|
||||
} else if (existingTreatment.isValid && existingTreatment.insulin > 0 && treatment.insulin == 0) {
|
||||
treatment.insulin = existingTreatment.insulin;
|
||||
}
|
||||
|
||||
getDao().delete(existingTreatment); // need to delete/create because date may change too
|
||||
|
|
|
@ -58,8 +58,7 @@ class DanaRSPlugin @Inject constructor(
|
|||
private val danaPump: DanaPump,
|
||||
private val detailedBolusInfoStorage: DetailedBolusInfoStorage,
|
||||
private val fabricPrivacy: FabricPrivacy,
|
||||
private val dateUtil: DateUtil,
|
||||
private val config: ConfigInterface
|
||||
private val dateUtil: DateUtil
|
||||
) : PumpPluginBase(PluginDescription()
|
||||
.mainType(PluginType.PUMP)
|
||||
.fragmentClass(info.nightscout.androidaps.dana.DanaFragment::class.java.name)
|
||||
|
|
Loading…
Reference in a new issue