NSCv3: fix extended bolus sync
This commit is contained in:
parent
24bdf92270
commit
17c3ef6274
|
@ -528,10 +528,10 @@ class DataSyncSelectorV3 @Inject constructor(
|
|||
aapsLogger.info(LTag.NSCLIENT, "Ignoring ExtendedBolus. Only NS id changed ID: ${eb.second.id} ")
|
||||
// without nsId = create new
|
||||
eb.first.interfaceIDs.nightscoutId == null ->
|
||||
cont = activePlugin.activeNsClient?.nsAdd("treatments", DataSyncSelector.PairExtendedBolus(eb.first, eb.second.id), "$startId/$lastDbId") ?: false
|
||||
cont = activePlugin.activeNsClient?.nsAdd("treatments", DataSyncSelector.PairExtendedBolus(eb.first, eb.second.id), "$startId/$lastDbId", profile) ?: false
|
||||
// with nsId = update
|
||||
eb.first.interfaceIDs.nightscoutId != null ->
|
||||
cont = activePlugin.activeNsClient?.nsUpdate("treatments", DataSyncSelector.PairExtendedBolus(eb.first, eb.second.id), "$startId/$lastDbId") ?: false
|
||||
cont = activePlugin.activeNsClient?.nsUpdate("treatments", DataSyncSelector.PairExtendedBolus(eb.first, eb.second.id), "$startId/$lastDbId", profile) ?: false
|
||||
}
|
||||
} else aapsLogger.info(LTag.NSCLIENT, "Ignoring ExtendedBolus. No profile: ${eb.second.id} ")
|
||||
if (cont) confirmLastExtendedBolusIdIfGreater(eb.second.id)
|
||||
|
|
|
@ -35,7 +35,7 @@ class TreatmentsActivity : TranslatedDaggerAppCompatActivity() {
|
|||
|
||||
// Use index, TabItems crashes with an id
|
||||
val useFakeTempBasal = activePlugin.activePump.isFakingTempsByExtendedBoluses
|
||||
binding.treatmentsTabs.getTabAt(1)?.view?.visibility = useFakeTempBasal.toVisibility()
|
||||
binding.treatmentsTabs.getTabAt(1)?.view?.visibility = useFakeTempBasal.not().toVisibility()
|
||||
|
||||
setFragment(TreatmentsBolusCarbsFragment())
|
||||
setSupportActionBar(binding.toolbar)
|
||||
|
|
Loading…
Reference in a new issue