Actions tab: show profile switch button for single profile too.

This commit is contained in:
Johannes Mockenhaupt 2017-12-20 16:15:55 +01:00
parent eb34345ee2
commit d1085c876e
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -127,8 +127,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
return;
}
final PumpInterface pump = ConfigBuilderPlugin.getActivePump();
boolean allowProfileSwitch = MainApp.getConfigBuilder().getActiveProfileInterface().getProfile().getProfileList().size() > 1;
if (!pump.getPumpDescription().isSetBasalProfileCapable || !pump.isInitialized() || pump.isSuspended() || !allowProfileSwitch)
if (!pump.getPumpDescription().isSetBasalProfileCapable || !pump.isInitialized() || pump.isSuspended())
profileSwitch.setVisibility(View.GONE);
else
profileSwitch.setVisibility(View.VISIBLE);