From 599c87f7942493e1eed4310a7f8f38bb95144a18 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 2 May 2018 22:34:55 +0200 Subject: [PATCH] Combo: better error message when initialization fails. --- .../androidaps/plugins/PumpCombo/ComboFragment.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index 3e3a9a33fc..455f1f7015 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -120,12 +120,18 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis // activity String activity = plugin.getPump().activity; - if (StringUtils.isNotEmpty(activity)) { + if (activity != null) { + activityView.setTextColor(Color.WHITE); activityView.setTextSize(14); activityView.setText(activity); - } else { + } else if (plugin.isInitialized()){ + activityView.setTextColor(Color.WHITE); activityView.setTextSize(20); activityView.setText("{fa-bed}"); + } else { + activityView.setTextColor(Color.RED); + activityView.setTextSize(14); + activityView.setText(MainApp.gs(R.string.pump_unreachable)); } if (plugin.isInitialized()) {