Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Loop/Managers/WatchDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ final class WatchDataManager: NSObject, WCSessionDelegate {

@objc private func updateWatch(_ notification: Notification) {
guard
let rawContext = (notification as NSNotification).userInfo?[LoopDataManager.LoopUpdateContextKey] as? LoopDataManager.LoopUpdateContext.RawValue,
let rawContext = notification.userInfo?[LoopDataManager.LoopUpdateContextKey] as? LoopDataManager.LoopUpdateContext.RawValue,
let context = LoopDataManager.LoopUpdateContext(rawValue: rawContext),
case .tempBasal = context,
let session = watchSession
Expand Down
2 changes: 1 addition & 1 deletion Loop/View Controllers/PredictionTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class PredictionTableViewController: UITableViewController, IdentifiableClass {
var components = DateComponents()
components.minute = 0
let date = Date(timeIntervalSinceNow: -TimeInterval(hours: 1))
charts.startDate = (calendar as NSCalendar).nextDate(after: date, matching: components, options: [.matchStrictly, .searchBackwards]) ?? date
charts.startDate = calendar.nextDate(after: date, matching: components, matchingPolicy: .strict, direction: .backward) ?? date

let reloadGroup = DispatchGroup()
var glucoseUnit: HKUnit?
Expand Down
4 changes: 2 additions & 2 deletions Loop/View Controllers/StatusTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize
var components = DateComponents()
components.minute = 0
let date = Date(timeIntervalSinceNow: -TimeInterval(hours: 6))
charts.startDate = (calendar as NSCalendar).nextDate(after: date, matching: components, options: [.matchStrictly, .searchBackwards]) ?? date
charts.startDate = calendar.nextDate(after: date, matching: components, matchingPolicy: .strict, direction: .backward) ?? date
charts.glucoseDisplayRange = (
min: HKQuantity(unit: HKUnit.milligramsPerDeciliterUnit(), doubleValue: 75),
max: HKQuantity(unit: HKUnit.milligramsPerDeciliterUnit(), doubleValue: 225)
)

let reloadGroup = DispatchGroup()
var glucoseUnit: HKUnit?

Expand Down