Skip to content

Commit

Permalink
Merge branch 'LoopKit:dev' into trio
Browse files Browse the repository at this point in the history
  • Loading branch information
marionbarker authored Oct 7, 2024
2 parents a5c1d66 + a03be57 commit edb6956
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions LoopKitUI/CarbKit/CarbQuantityRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public struct CarbQuantityRow: View {
private let formatter: NumberFormatter = {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
formatter.maximumIntegerDigits = 3
formatter.maximumFractionDigits = 1
return formatter
}()
Expand Down Expand Up @@ -76,13 +77,8 @@ public struct CarbQuantityRow: View {

// Update quantity based on text field input
private func updateQuantity(with input: String) {
let filtered = input.filter { "0123456789.".contains($0) }
if filtered != input {
self.carbInput = filtered
}

if let doubleValue = Double(filtered) {
quantity = doubleValue
if let number = formatter.number(from: input) {
quantity = number.doubleValue
} else {
quantity = nil
}
Expand Down
4 changes: 2 additions & 2 deletions LoopKitUI/Views/CheckmarkListItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public struct CheckmarkListItem: View {
.foregroundColor(.accentColor)
} else {
Circle()
.stroke()
.foregroundColor(Color(.systemGray4))
.stroke(lineWidth: 2)
.foregroundColor(Color(.systemGray))
}
}

Expand Down

0 comments on commit edb6956

Please sign in to comment.