fix showing EB tab in treatments
This commit is contained in:
parent
23c12077c6
commit
e363ac2c6a
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue