fix showing EB tab in treatments
This commit is contained in:
parent
23c12077c6
commit
e363ac2c6a
2 changed files with 3 additions and 3 deletions
core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/defs
ui/src/main/kotlin/app/aaps/ui/activities
|
@ -9,7 +9,7 @@ class PumpDescription() {
|
||||||
var pumpType = PumpType.GENERIC_AAPS
|
var pumpType = PumpType.GENERIC_AAPS
|
||||||
var isBolusCapable = false
|
var isBolusCapable = false
|
||||||
var bolusStep = 0.0
|
var bolusStep = 0.0
|
||||||
var isExtendedBolusCapable = false
|
var isExtendedBolusCapable = true
|
||||||
var extendedBolusStep = 0.0
|
var extendedBolusStep = 0.0
|
||||||
var extendedBolusDurationStep = 0.0
|
var extendedBolusDurationStep = 0.0
|
||||||
var extendedBolusMaxDuration = 0.0
|
var extendedBolusMaxDuration = 0.0
|
||||||
|
|
|
@ -34,8 +34,8 @@ class TreatmentsActivity : TranslatedDaggerAppCompatActivity() {
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
// Use index, TabItems crashes with an id
|
// Use index, TabItems crashes with an id
|
||||||
val useFakeTempBasal = activePlugin.activePump.isFakingTempsByExtendedBoluses
|
val showEbTab = !activePlugin.activePump.isFakingTempsByExtendedBoluses && activePlugin.activePump.pumpDescription.isExtendedBolusCapable
|
||||||
binding.treatmentsTabs.getTabAt(1)?.view?.visibility = useFakeTempBasal.not().toVisibility()
|
binding.treatmentsTabs.getTabAt(1)?.view?.visibility = showEbTab.toVisibility()
|
||||||
|
|
||||||
setFragment(TreatmentsBolusCarbsFragment())
|
setFragment(TreatmentsBolusCarbsFragment())
|
||||||
setSupportActionBar(binding.toolbar)
|
setSupportActionBar(binding.toolbar)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue