Skip to content

Commit ea25a86

Browse files
authored
use LoopConstants instead of hard-coded time intervals (#2050)
1 parent 7c60cac commit ea25a86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Loop/View Models/CarbEntryViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ final class CarbEntryViewModel: ObservableObject {
5959
@Published var time = Date()
6060
private var date = Date()
6161
var minimumDate: Date {
62-
get { date.addingTimeInterval(.hours(-12)) }
62+
get { date.addingTimeInterval(LoopConstants.maxCarbEntryPastTime) }
6363
}
6464
var maximumDate: Date {
65-
get { date.addingTimeInterval(.hours(1)) }
65+
get { date.addingTimeInterval(LoopConstants.maxCarbEntryFutureTime) }
6666
}
6767

6868
@Published var foodType = ""

0 commit comments

Comments
 (0)