Skip to content

Commit

Permalink
Revert "Fix merge conflicts when moving lockscreen setting to notific…
Browse files Browse the repository at this point in the history
…ations menu"

This reverts commit b06ae0a.
  • Loading branch information
MikePlante1 committed Mar 12, 2024
1 parent c15ca1a commit 6e5766b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ extension NotificationsConfig {
@Published var highGlucose: Decimal = 0
@Published var carbsRequiredThreshold: Decimal = 0
@Published var useLiveActivity = false
@Published var lockScreenView: LockScreenView = .simple
var units: GlucoseUnits = .mmolL

override func subscribe() {
Expand All @@ -23,7 +22,7 @@ extension NotificationsConfig {
subscribeSetting(\.addSourceInfoToGlucoseNotifications, on: $addSourceInfoToGlucoseNotifications) {
addSourceInfoToGlucoseNotifications = $0 }
subscribeSetting(\.useLiveActivity, on: $useLiveActivity) { useLiveActivity = $0 }
subscribeSetting(\.lockScreenView, on: $lockScreenView) { lockScreenView = $0 }

subscribeSetting(\.lowGlucose, on: $lowGlucose, initial: {
let value = max(min($0, 400), 40)
lowGlucose = units == .mmolL ? value.asMmolL : value
Expand Down
2 changes: 2 additions & 0 deletions FreeAPS/Sources/Modules/StatConfig/StatConfigStateModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extension StatConfig {
@Published var yGridLines: Bool = false
@Published var oneDimensionalGraph = false
@Published var rulerMarks: Bool = false
@Published var lockScreenView: LockScreenView = .simple

var units: GlucoseUnits = .mmolL

Expand All @@ -22,6 +23,7 @@ extension StatConfig {
subscribeSetting(\.yGridLines, on: $yGridLines) { yGridLines = $0 }
subscribeSetting(\.rulerMarks, on: $rulerMarks) { rulerMarks = $0 }
subscribeSetting(\.oneDimensionalGraph, on: $oneDimensionalGraph) { oneDimensionalGraph = $0 }
subscribeSetting(\.lockScreenView, on: $lockScreenView) { lockScreenView = $0 }

subscribeSetting(\.low, on: $low, initial: {
let value = max(min($0, 90), 40)
Expand Down

0 comments on commit 6e5766b

Please sign in to comment.