ktlintFormat
This commit is contained in:
parent
89a6a2d2ab
commit
abfd71a4b8
|
@ -20,7 +20,6 @@ import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordEntity
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordEntity
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
|
||||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
@ -155,7 +154,6 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class RecyclerViewAdapter internal constructor(historyList: List<HistoryRecordEntity>) : RecyclerView.Adapter<RecyclerViewAdapter.HistoryViewHolder>() {
|
inner class RecyclerViewAdapter internal constructor(historyList: List<HistoryRecordEntity>) : RecyclerView.Adapter<RecyclerViewAdapter.HistoryViewHolder>() {
|
||||||
|
@ -172,13 +170,16 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: HistoryViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: HistoryViewHolder, position: Int) {
|
||||||
val record: HistoryRecordEntity = historyList[position]
|
val record: HistoryRecordEntity = historyList[position]
|
||||||
if (record != null) {
|
record?.let {
|
||||||
holder.timeView.setText(DateTimeUtil.toStringFromTimeInMillis(record.date))
|
holder.timeView.text = DateTimeUtil.toStringFromTimeInMillis(record.date)
|
||||||
//holder.typeView.setText(PodHistoryEntryType.getByCode(record.getPodEntryTypeCode()).getResourceId());
|
|
||||||
setValue(record, holder.valueView)
|
setValue(record, holder.valueView)
|
||||||
|
setType(record, holder.typeView)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setType(record: HistoryRecordEntity, typeView: TextView) {
|
||||||
|
}
|
||||||
|
|
||||||
private fun setValue(historyEntry: HistoryRecordEntity, valueView: TextView) {
|
private fun setValue(historyEntry: HistoryRecordEntity, valueView: TextView) {
|
||||||
valueView.text = historyEntry.toString()
|
valueView.text = historyEntry.toString()
|
||||||
// val entryType = historyEntry.commandType
|
// val entryType = historyEntry.commandType
|
||||||
|
@ -271,7 +272,6 @@ class DashPodHistoryActivity : NoSplashAppCompatActivity() {
|
||||||
val typeView: TextView = itemView.findViewById<TextView>(R.id.omnipod_history_source)
|
val typeView: TextView = itemView.findViewById<TextView>(R.id.omnipod_history_source)
|
||||||
val valueView: TextView = itemView.findViewById<TextView>(R.id.omnipod_history_description)
|
val valueView: TextView = itemView.findViewById<TextView>(R.id.omnipod_history_description)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Reference in a new issue