simplify NSC setting

This commit is contained in:
Milos Kozak 2021-10-26 13:34:30 +02:00
parent da52daeefe
commit c727b745a5
2 changed files with 6 additions and 5 deletions

View file

@ -20,6 +20,7 @@ import info.nightscout.androidaps.plugins.configBuilder.events.EventConfigBuilde
import info.nightscout.androidaps.utils.FabricPrivacy
import io.reactivex.rxkotlin.plusAssign
import info.nightscout.androidaps.extensions.toVisibility
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
import info.nightscout.androidaps.utils.protection.ProtectionCheck
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.rx.AapsSchedulers
@ -37,6 +38,7 @@ class ConfigBuilderFragment : DaggerFragment() {
@Inject lateinit var activePlugin: ActivePlugin
@Inject lateinit var protectionCheck: ProtectionCheck
@Inject lateinit var config: Config
@Inject lateinit var buildHelper: BuildHelper
private var disposable: CompositeDisposable = CompositeDisposable()
private val pluginViewHolders = ArrayList<PluginViewHolder>()
@ -103,11 +105,13 @@ class ConfigBuilderFragment : DaggerFragment() {
if (!config.NSCLIENT) {
createViewsForPlugins(R.string.configbuilder_profile, R.string.configbuilder_profile_description, PluginType.PROFILE, activePlugin.getSpecificPluginsVisibleInList(PluginType.PROFILE))
}
if (config.APS || config.PUMPCONTROL || buildHelper.isEngineeringMode())
createViewsForPlugins(R.string.configbuilder_insulin, R.string.configbuilder_insulin_description, PluginType.INSULIN, activePlugin.getSpecificPluginsVisibleInList(PluginType.INSULIN))
if (!config.NSCLIENT) {
createViewsForPlugins(R.string.configbuilder_bgsource, R.string.configbuilder_bgsource_description, PluginType.BGSOURCE, activePlugin.getSpecificPluginsVisibleInList(PluginType.BGSOURCE))
createViewsForPlugins(R.string.configbuilder_pump, R.string.configbuilder_pump_description, PluginType.PUMP, activePlugin.getSpecificPluginsVisibleInList(PluginType.PUMP))
}
if (config.APS || config.PUMPCONTROL || buildHelper.isEngineeringMode())
createViewsForPlugins(R.string.configbuilder_sensitivity, R.string.configbuilder_sensitivity_description, PluginType.SENSITIVITY, activePlugin.getSpecificPluginsVisibleInList(PluginType.SENSITIVITY))
if (config.APS) {
createViewsForPlugins(R.string.configbuilder_aps, R.string.configbuilder_aps_description, PluginType.APS, activePlugin.getSpecificPluginsVisibleInList(PluginType.APS))

View file

@ -431,9 +431,6 @@ class SWDefinition @Inject constructor(
.add(screenNsClient)
//.add(screenBgSource)
.add(screenPatientName)
.add(screenAge)
.add(screenInsulin)
.add(screenSensitivity)
}
init {