- small logging so that we can fix this date parsing problem
This commit is contained in:
parent
5230a2dda0
commit
0fdcb862a6
2 changed files with 10 additions and 8 deletions
|
@ -243,7 +243,6 @@ public class PodHistoryActivity extends NoSplashActivity {
|
|||
if (record != null) {
|
||||
holder.timeView.setText(record.getDateTimeString());
|
||||
holder.typeView.setText(record.getPodDbEntryType().getResourceId());
|
||||
//holder.valueView.setText(""); // TODO
|
||||
setValue(record, holder.valueView);
|
||||
}
|
||||
}
|
||||
|
@ -255,8 +254,7 @@ public class PodHistoryActivity extends NoSplashActivity {
|
|||
|
||||
case FillCannulaSetBasalProfile: {
|
||||
if (historyEntry.getData() != null) {
|
||||
Profile profile = OmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), Profile.class);
|
||||
valueView.setText(ProfileUtil.getProfileDisplayable(profile, PumpType.Insulet_Omnipod));
|
||||
setProfileValue(historyEntry.getData(), valueView);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -268,8 +266,7 @@ public class PodHistoryActivity extends NoSplashActivity {
|
|||
break;
|
||||
|
||||
case SetBasalSchedule: {
|
||||
Profile profile = OmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), Profile.class);
|
||||
valueView.setText(ProfileUtil.getProfileDisplayable(profile, PumpType.Insulet_Omnipod));
|
||||
setProfileValue(historyEntry.getData(), valueView);
|
||||
}
|
||||
break;
|
||||
case GetPodStatus:
|
||||
|
@ -301,6 +298,7 @@ public class PodHistoryActivity extends NoSplashActivity {
|
|||
case ResumeDelivery:
|
||||
case UnknownEntryType:
|
||||
default:
|
||||
valueView.setText("");
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -310,6 +308,12 @@ public class PodHistoryActivity extends NoSplashActivity {
|
|||
|
||||
}
|
||||
|
||||
private void setProfileValue(String data, TextView valueView) {
|
||||
LOG.debug("Profile json:\n" + data);
|
||||
Profile profile = OmnipodUtil.getGsonInstance().fromJson(data, Profile.class);
|
||||
valueView.setText(ProfileUtil.getProfileDisplayable(profile, PumpType.Insulet_Omnipod));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.driver.db;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -37,8 +36,7 @@ public enum PodHistoryEntryType {
|
|||
SuspendDelivery(60, R.string.omnipod_cmd_suspend_delivery),
|
||||
ResumeDelivery(61, R.string.omnipod_cmd_resume_delivery),
|
||||
|
||||
UnknownEntryType(99, R.string.omnipod_cmd_umknown_entry)
|
||||
;
|
||||
UnknownEntryType(99, R.string.omnipod_cmd_unknown_entry);
|
||||
|
||||
private int code;
|
||||
private static Map<Integer, PodHistoryEntryType> instanceMap;
|
||||
|
|
Loading…
Reference in a new issue