show danar prefs only if pump is enabled

This commit is contained in:
Milos Kozak 2016-09-10 15:37:37 +02:00
parent 05831c75a6
commit 87055bef0b

View file

@ -87,9 +87,9 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
addPreferencesFromResource(R.xml.pref_openapsma);
addPreferencesFromResource(R.xml.pref_nightscout);
if (Config.DANAR) {
addPreferencesFromResource(R.xml.pref_danar);
DanaRPlugin danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class);
if (danaRPlugin.isEnabled(PluginBase.PUMP)) {
addPreferencesFromResource(R.xml.pref_danar);
addPreferencesFromResource(R.xml.pref_danarprofile);
}
}