@@ -137,7 +137,7 @@ enum DataTable {
case .bolus:
return numberFormatter
.string(from: amount as NSNumber)! + NSLocalizedString(" U", comment: "Insulin unit") +
- "\((isSMB ?? true)! ? " SMB" : " Manual")"
+ "\(isSMB ?? false ? " SMB" : "")"
case .tempBasal:
.string(from: amount as NSNumber)! + NSLocalizedString(" U/hr", comment: "Unit insulin per hour")
@@ -66,7 +66,14 @@ extension DataTable {
let boluses = self.provider.pumpHistory()
.filter { $0.type == .bolus }
.map {
- Treatment(units: units, type: .bolus, date: $0.timestamp, amount: $0.amount, idPumpEvent: $0.id)
+ Treatment(
+ units: units,
+ type: .bolus,
+ date: $0.timestamp,
+ amount: $0.amount,
+ idPumpEvent: $0.id,
+ isSMB: $0.isSMB
+ )
}
let tempBasals = self.provider.pumpHistory()
@@ -113,8 +113,9 @@ extension DataTable {
Image(systemName: "circle.fill").foregroundColor(item.color)
Text(dateFormatter.string(from: item.date))
.moveDisabled(true)
- Text(item.type.name)
+ Text((item.isSMB ?? false) ? "🤖" : item.type.name)
Text(item.amountText).foregroundColor(.secondary)
+
if let duration = item.durationText {
Text(duration).foregroundColor(.secondary)