fix showing EB tab in treatments

This commit is contained in:
Milos Kozak 2023-10-25 10:07:14 +02:00
parent 23c12077c6
commit e363ac2c6a
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class PumpDescription() {
var pumpType = PumpType.GENERIC_AAPS
var isBolusCapable = false
var bolusStep = 0.0
var isExtendedBolusCapable = false
var isExtendedBolusCapable = true
var extendedBolusStep = 0.0
var extendedBolusDurationStep = 0.0
var extendedBolusMaxDuration = 0.0

View file

@ -34,8 +34,8 @@ class TreatmentsActivity : TranslatedDaggerAppCompatActivity() {
setContentView(binding.root)
// Use index, TabItems crashes with an id
val useFakeTempBasal = activePlugin.activePump.isFakingTempsByExtendedBoluses
binding.treatmentsTabs.getTabAt(1)?.view?.visibility = useFakeTempBasal.not().toVisibility()
val showEbTab = !activePlugin.activePump.isFakingTempsByExtendedBoluses && activePlugin.activePump.pumpDescription.isExtendedBolusCapable
binding.treatmentsTabs.getTabAt(1)?.view?.visibility = showEbTab.toVisibility()
setFragment(TreatmentsBolusCarbsFragment())
setSupportActionBar(binding.toolbar)