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
4 changes: 2 additions & 2 deletions G7SensorKit/G7CGMManager/G7CGMManagerState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct G7CGMManagerState: RawRepresentable, Equatable {
public var latestReading: G7GlucoseMessage?
public var latestReadingTimestamp: Date?
public var latestConnect: Date?
public var uploadReadings: Bool = false
public var uploadReadings: Bool = true

init() {
}
Expand All @@ -31,7 +31,7 @@ public struct G7CGMManagerState: RawRepresentable, Equatable {
}
self.latestReadingTimestamp = rawValue["latestReadingTimestamp"] as? Date
self.latestConnect = rawValue["latestConnect"] as? Date
self.uploadReadings = rawValue["uploadReadings"] as? Bool ?? false
self.uploadReadings = rawValue["uploadReadings"] as? Bool ?? true
}

public var rawValue: RawValue {
Expand Down
2 changes: 1 addition & 1 deletion G7SensorKitUI/Views/G7SettingsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class G7SettingsViewModel: ObservableObject {
@Published private(set) var activatedAt: Date?
@Published private(set) var lastConnect: Date?
@Published private(set) var latestReadingTimestamp: Date?
@Published var uploadReadings: Bool = false {
@Published var uploadReadings: Bool = true {
didSet {
cgmManager.uploadReadings = uploadReadings
}
Expand Down