disable visible control when plugin is not enabled

This commit is contained in:
Milos Kozak 2017-01-01 13:45:03 +01:00
parent fb320968a1
commit 86f5aec0bb

View file

@ -205,6 +205,10 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
holder.checkboxVisible.setEnabled(false);
}
if (!plugin.isEnabled(type)) {
holder.checkboxVisible.setEnabled(false);
}
// Hide enabled control and force enabled plugin if there is only one plugin available
if (type == PluginBase.PUMP || type == PluginBase.TREATMENT || type == PluginBase.TEMPBASAL || type == PluginBase.PROFILE)
if (pluginList.size() < 2) {