Minor tweaks.

This commit is contained in:
Johannes Mockenhaupt 2017-11-12 00:37:03 +01:00
parent c11086d9ea
commit 02af439dd7
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 5 additions and 4 deletions

View file

@ -23,7 +23,7 @@
- [ ] TDD
- [x] Read
- [ ] Sync DB?
- [ ] Display in UI
- [x] Display in UI
- [ ] Taking over alerts
- [ ] On connect
- [ ] During bolusing

View file

@ -31,7 +31,7 @@ public class ComboErrorHistoryDialog extends DialogFragment {
text = (TextView) layout.findViewById(R.id.combo_error_history_text);
List<PumpError> errors = ComboPlugin.getPlugin().getPump().history.pumpErrorHistory;
StringBuilder sb = new StringBuilder();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM HH:mm");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM. HH:mm");
if (errors.isEmpty()) {
text.setText("No errors. To retrieve the error history from the pump, long press the Refresh button.");
} else {

View file

@ -31,14 +31,15 @@ public class ComboTddHistoryDialog extends DialogFragment {
text = (TextView) layout.findViewById(R.id.combo_tdd_history_text);
List<Tdd> tdds = ComboPlugin.getPlugin().getPump().history.tddHistory;
StringBuilder sb = new StringBuilder();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM.");
if (tdds.isEmpty()) {
text.setText("No TDDs. To retrieve the TDD history from the pump, long press the Refresh button.");
} else {
for (Tdd tdd : tdds) {
sb.append(simpleDateFormat.format(tdd.timestamp));
sb.append(" ");
sb.append(tdd.total);
sb.append(String.format("%.1f", tdd.total));
sb.append(" U");
sb.append("\n");
}
text.setText(sb.toString());