Merge pull request #982 from jotomo/init-failed-msg
Combo: better error message when initialization fails
This commit is contained in:
commit
f8310d6974
2 changed files with 9 additions and 3 deletions
|
@ -120,12 +120,18 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis
|
||||||
|
|
||||||
// activity
|
// activity
|
||||||
String activity = plugin.getPump().activity;
|
String activity = plugin.getPump().activity;
|
||||||
if (StringUtils.isNotEmpty(activity)) {
|
if (activity != null) {
|
||||||
|
activityView.setTextColor(Color.WHITE);
|
||||||
activityView.setTextSize(14);
|
activityView.setTextSize(14);
|
||||||
activityView.setText(activity);
|
activityView.setText(activity);
|
||||||
} else {
|
} else if (plugin.isInitialized()){
|
||||||
|
activityView.setTextColor(Color.WHITE);
|
||||||
activityView.setTextSize(20);
|
activityView.setTextSize(20);
|
||||||
activityView.setText("{fa-bed}");
|
activityView.setText("{fa-bed}");
|
||||||
|
} else {
|
||||||
|
activityView.setTextColor(Color.RED);
|
||||||
|
activityView.setTextSize(14);
|
||||||
|
activityView.setText(MainApp.gs(R.string.pump_unreachable));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isInitialized()) {
|
if (plugin.isInitialized()) {
|
||||||
|
|
|
@ -465,7 +465,7 @@ public class WatchUpdaterService extends WearableListenerService implements
|
||||||
|
|
||||||
List<Treatment> treatments = TreatmentsPlugin.getPlugin().getTreatmentsFromHistory();
|
List<Treatment> treatments = TreatmentsPlugin.getPlugin().getTreatmentsFromHistory();
|
||||||
for (Treatment treatment : treatments) {
|
for (Treatment treatment : treatments) {
|
||||||
if (treatment.isValid && treatment.date > startTimeWindow) {
|
if (treatment.date > startTimeWindow) {
|
||||||
boluses.add(treatmentMap(treatment.date, treatment.insulin, treatment.carbs, treatment.isSMB, treatment.isValid));
|
boluses.add(treatmentMap(treatment.date, treatment.insulin, treatment.carbs, treatment.isSMB, treatment.isValid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue