Disable profile control for pump profiles if pump is not enabled

This commit is contained in:
Milos Kozak 2016-12-11 13:46:27 +01:00
parent 0d6787a744
commit 8f6f6e326d

View file

@ -229,6 +229,16 @@ public class ConfigBuilderFragment extends Fragment implements FragmentBase {
} }
} }
// Disable profile control for pump profiles if pump is not enabled
if (type == PluginBase.PROFILE) {
if (PumpInterface.class.isAssignableFrom(plugin.getClass())) {
if (!plugin.isEnabled(PluginBase.PUMP)) {
holder.checkboxEnabled.setEnabled(false);
holder.checkboxEnabled.setChecked(false);
}
}
}
return convertView; return convertView;
} }