Skip to content

Commit

Permalink
use LoopConstants instead of hard-coded time intervals (#2050)
Browse files Browse the repository at this point in the history
  • Loading branch information
marionbarker authored Oct 28, 2023
1 parent 7c60cac commit ea25a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Loop/View Models/CarbEntryViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ final class CarbEntryViewModel: ObservableObject {
@Published var time = Date()
private var date = Date()
var minimumDate: Date {
get { date.addingTimeInterval(.hours(-12)) }
get { date.addingTimeInterval(LoopConstants.maxCarbEntryPastTime) }
}
var maximumDate: Date {
get { date.addingTimeInterval(.hours(1)) }
get { date.addingTimeInterval(LoopConstants.maxCarbEntryFutureTime) }
}

@Published var foodType = ""
Expand Down

0 comments on commit ea25a86

Please sign in to comment.