Combo: better error message when initialization fails.

This commit is contained in:
Johannes Mockenhaupt 2018-05-02 22:34:55 +02:00
parent a64bfe7a39
commit 599c87f794
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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()) {