klint
This commit is contained in:
parent
b645185005
commit
d966254815
1 changed files with 32 additions and 25 deletions
|
@ -97,6 +97,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
PumpHistoryEntryGroup.Unknown
|
PumpHistoryEntryGroup.Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun filterHistory(group: PumpHistoryEntryGroup) {
|
private fun filterHistory(group: PumpHistoryEntryGroup) {
|
||||||
filteredHistoryList.clear()
|
filteredHistoryList.clear()
|
||||||
aapsLogger.debug(LTag.PUMP, "Items on full list: {}", fullHistoryList.size)
|
aapsLogger.debug(LTag.PUMP, "Items on full list: {}", fullHistoryList.size)
|
||||||
|
@ -241,6 +242,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
OmnipodCommandType.SET_TEMPORARY_BASAL -> {
|
OmnipodCommandType.SET_TEMPORARY_BASAL -> {
|
||||||
android.graphics.Color.WHITE
|
android.graphics.Color.WHITE
|
||||||
}
|
}
|
||||||
|
|
||||||
else ->
|
else ->
|
||||||
// Other
|
// Other
|
||||||
android.graphics.Color.LTGRAY
|
android.graphics.Color.LTGRAY
|
||||||
|
@ -268,12 +270,14 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
resourceHelper.gs(R.string.omnipod_common_history_tbr_value, it.rate, it.duration)
|
resourceHelper.gs(R.string.omnipod_common_history_tbr_value, it.rate, it.duration)
|
||||||
} ?: "n/a"
|
} ?: "n/a"
|
||||||
}
|
}
|
||||||
|
|
||||||
OmnipodCommandType.SET_BOLUS -> {
|
OmnipodCommandType.SET_BOLUS -> {
|
||||||
val bolus = historyEntry.record as BolusRecord
|
val bolus = historyEntry.record as BolusRecord
|
||||||
bolus?.let {
|
bolus?.let {
|
||||||
resourceHelper.gs(R.string.omnipod_common_history_bolus_value, it.amout)
|
resourceHelper.gs(R.string.omnipod_common_history_bolus_value, it.amout)
|
||||||
} ?: "n/a"
|
} ?: "n/a"
|
||||||
}
|
}
|
||||||
|
|
||||||
OmnipodCommandType.SET_BASAL_PROFILE,
|
OmnipodCommandType.SET_BASAL_PROFILE,
|
||||||
OmnipodCommandType.SET_TIME,
|
OmnipodCommandType.SET_TIME,
|
||||||
OmnipodCommandType.INSERT_CANNULA,
|
OmnipodCommandType.INSERT_CANNULA,
|
||||||
|
@ -281,6 +285,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
val basal = historyEntry.record as BasalValuesRecord
|
val basal = historyEntry.record as BasalValuesRecord
|
||||||
ProfileUtil.getBasalProfilesDisplayable(basal.segments.toTypedArray(), PumpType.OMNIPOD_DASH)
|
ProfileUtil.getBasalProfilesDisplayable(basal.segments.toTypedArray(), PumpType.OMNIPOD_DASH)
|
||||||
}
|
}
|
||||||
|
|
||||||
else ->
|
else ->
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
|
@ -293,6 +298,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class HistoryViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
inner class HistoryViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
|
|
||||||
val timeView: TextView = itemView.findViewById(R.id.omnipod_history_time)
|
val timeView: TextView = itemView.findViewById(R.id.omnipod_history_time)
|
||||||
val typeView: TextView = itemView.findViewById(R.id.omnipod_history_source)
|
val typeView: TextView = itemView.findViewById(R.id.omnipod_history_source)
|
||||||
val valueView: TextView = itemView.findViewById(R.id.omnipod_history_description)
|
val valueView: TextView = itemView.findViewById(R.id.omnipod_history_description)
|
||||||
|
@ -314,6 +320,7 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private var selectedGroup: PumpHistoryEntryGroup = PumpHistoryEntryGroup.All
|
private var selectedGroup: PumpHistoryEntryGroup = PumpHistoryEntryGroup.All
|
||||||
const val DAYS_TO_DISPLAY = 5
|
const val DAYS_TO_DISPLAY = 5
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue