new attributes model

This commit is contained in:
Paul Plant 2023-12-31 12:21:38 +01:00
parent f9e00b52dc
commit 58f52c7957
36 changed files with 389 additions and 282 deletions

View File

@ -0,0 +1,13 @@
//
// ConstantsWidget.swift
// xDripWidgetExtension
//
// Created by Paul Plant on 31/12/23.
// Copyright © 2023 Johan Degraeve. All rights reserved.
//
enum ConstantsWidget {
static let mmollToMgdl = 18.01801801801802
static let mgDlToMmoll = 0.0555
}

View File

@ -0,0 +1,140 @@
//
// Double.swift
// xDripWidgetExtension
//
// Created by Paul Plant on 31/12/23.
// Copyright © 2023 Johan Degraeve. All rights reserved.
//
import Foundation
extension Double {
// MARK: - copied to xDripWidgetExtension from main xDrip target
/// Converts to a string and removes trailing .0
public var stringWithoutTrailingZeroes: String {
var description = String(self.description)
// Checks if ends with .0 and removes if so
if description.suffix(2) == ".0" {
description = String(description.dropLast(2))
}
return description
}
/// converts mgdl to mmol
func mgdlToMmol() -> Double {
return self * ConstantsWidget.mgDlToMmoll
}
/// converts mgdl to mmol if parameter mgdl = false. If mgdl = true then just returns self
func mgdlToMmol(mgdl:Bool) -> Double {
if mgdl {
return self
} else {
return self * ConstantsWidget.mgDlToMmoll
}
}
/// converts mmol to mgdl if parameter mgdl = false. If mgdl = true then just returns self
func mmolToMgdl(mgdl:Bool) -> Double {
if mgdl {
return self
} else {
return self.mmolToMgdl()
}
}
/// converts mmol to mgdl
func mmolToMgdl() -> Double {
return self * ConstantsWidget.mmollToMgdl
}
/// returns the value rounded to fractionDigits
func round(toDecimalPlaces: Int) -> Double {
let multiplier = pow(10, Double(toDecimalPlaces))
return Darwin.round(self * multiplier) / multiplier
}
/// takes self as Double as bloodglucose value, converts value to string, round. Number of digits after decimal seperator depends on the unit. For mg/dl 0 digits after decimal seperator, for mmol, 1 digit after decimal seperator
func bgValuetoString(mgdl:Bool) -> String {
if mgdl {
return String(format:"%.0f", self)
} else {
return String(format:"%.1f", self)
}
}
/// if mgdl, then returns self, unchanged. If not mgdl, return self rounded to 1 decimal place
func bgValueRounded(mgdl: Bool) -> Double {
if mgdl {
return self.round(toDecimalPlaces: 0)
} else {
return self.round(toDecimalPlaces: 1)
}
}
/// converts mmol to mgdl if parametermgdl = false and, converts value to string, round. Number of digits after decimal seperator depends on the unit. For mg/dl 0 digits after decimal seperator, for mmol, 1 digit after decimal seperator
///
/// this function is actually a combination of mmolToMgdl if mgdl = true and bgValuetoString
func mgdlToMmolAndToString(mgdl:Bool) -> String {
if mgdl {
return String(format:"%.0f", self)
} else {
return String(format:"%.1f", self.mgdlToMmol())
}
}
/// treats the double as timestamp in milliseconds, since 1970 and prints as date string
func asTimeStampInMilliSecondsToString() -> String {
let asDate = Date(timeIntervalSince1970: self/1000)
return asDate.description(with: .current)
}
/// returns the Nightscout style string showing the days and hours for the number of minutes
/// Example: 9300.minutesToDaysAndHours() would return -> "6d11h"
/// Example: 78.minutesToDaysAndHours() would return -> "1h18m"
/// Example: 12.minutesToDaysAndHours() would return -> "12m"
func minutesToDaysAndHours() -> String {
// set a default value assuming that we're unable to calculate the hours + days
var daysAndHoursString: String = "n/a"
let days = floor(self / (24 * 60))
let hoursInMinutes = self.truncatingRemainder(dividingBy: 24 * 60)
let hours = hoursInMinutes / 60
let minutes = self.truncatingRemainder(dividingBy: 24 * 60 * 60)
if days == 0 && hours < 1 {
// show just minutes for less than one hour
daysAndHoursString = abs(minutes).description + "m"
} else if days == 0 && hours < 12 {
// show just hours and minutes for less than twelve hours
daysAndHoursString = abs(hours).description + "h" + abs(minutes).description + "m"
} else {
// default show days and hours
daysAndHoursString = Int(days).description + "d" + Int(hours).description + "h"
}
return daysAndHoursString
}
}

View File

@ -11,124 +11,64 @@ import WidgetKit
import SwiftUI
struct XDripWidgetAttributes: ActivityAttributes {
public struct ContentState: Codable, Hashable {
enum EventType: Float, Codable, Hashable {
case urgentLowDropping
case urgentLow
case urgentLowRising
case lowDropping
case low
case lowRising
case inRangeDropping
case inRange
case inRangeRising
case highDropping
case high
case highRising
case urgentHighDropping
case urgentHigh
case urgentHighRising
var title: String {
switch self {
case .high, .highDropping, .highRising:
return "HIGH"
case .inRange, .inRangeDropping, .inRangeRising:
return "IN RANGE"
case .low, .lowDropping, .lowRising:
return "LOW"
case .urgentHigh, .urgentHighDropping, .urgentHighRising:
return "VERY HIGH"
case .urgentLow, .urgentLowDropping, .urgentLowRising:
return "VERY LOW"
}
}
var explanation: String {
switch self {
case .high:
return "You're not rising anymore"
case .highDropping:
return "You're starting to drop down to range"
case .highRising:
return "⚠️ You're still rising"
case .inRange:
return "Everything's looking good"
case .inRangeDropping:
return "All good, but dropping"
case .inRangeRising:
return "All good, but rising"
case .low:
return "You're not dropping anymore"
case .lowDropping:
return "⚠️ You're still dropping"
case .lowRising:
return "You're starting to rise back up"
case .urgentHigh:
return "You're not rising anymore but still very high"
case .urgentHighDropping:
return "You're starting to drop down to range"
case .urgentHighRising:
return "‼️ You're still rising"
case .urgentLow:
return "‼️ You are still too low"
case .urgentLowDropping:
return "‼️ You're low and still dropping"
case .urgentLowRising:
return "You're starting to come up to range"
}
}
var bgColorInt: Int {
switch self {
case .inRange, .inRangeDropping, .inRangeRising:
return 1
case .urgentHigh, .urgentHighDropping, .urgentHighRising, .urgentLow, .urgentLowDropping, .urgentLowRising:
return 2
case .high, .highDropping, .highRising, .low, .lowDropping, .lowRising:
return 3
}
}
}
// Dynamic stateful properties about your activity go here!
var eventType: EventType
var bgValueInMgDl: Double
var isMgDl: Bool
var trendArrow: String
var bgValueString: String
var bgValueColorInt: Int
var deltaChangeInMgDl: Double
var urgentLowLimitInMgDl: Double
var lowLimitInMgDl: Double
var highLimitInMgDl: Double
var urgentHighLimitInMgDl: Double
init(eventType: EventType , trendArrow: String, bgValueString: String, bgValueColorInt: Int) {
self.eventType = eventType
var bgValueStringInUserChosenUnit: String
var bgUnitString: String
init(bgValueInMgDl: Double, isMgDl: Bool, trendArrow: String, deltaChangeInMgDl: Double, urgentLowLimitInMgDl: Double, lowLimitInMgDl: Double, highLimitInMgDl: Double, urgentHighLimitInMgDl: Double) {
// these are the "passed in" stateful values used to initialize
self.bgValueInMgDl = bgValueInMgDl
self.isMgDl = isMgDl
self.trendArrow = trendArrow
self.bgValueString = bgValueString
self.bgValueColorInt = bgValueColorInt
self.deltaChangeInMgDl = deltaChangeInMgDl
self.urgentLowLimitInMgDl = urgentLowLimitInMgDl
self.lowLimitInMgDl = lowLimitInMgDl
self.highLimitInMgDl = highLimitInMgDl
self.urgentHighLimitInMgDl = urgentHighLimitInMgDl
// these are dynamically initialized based on the above
//self.bgValueInUserChosenUnit = bgValueInMgDl.mgdlToMmol(mgdl: isMgDl)
self.bgUnitString = isMgDl ? Texts_Widget.mgdl : Texts_Widget.mmol
self.bgValueStringInUserChosenUnit = bgValueInMgDl.mgdlToMmolAndToString(mgdl: isMgDl)
self.bgValueColorInt = getBgValueColor(bgValueString: bgValueString)
}
func getBgValueColor(bgValueString: String) -> Int {
let bgValue: Float = Float(bgValueString) ?? 1
switch bgValue {
case 0..<70:
return 1
case 71..<80:
return 3
case 81..<140:
return 2
case 141...:
return 3
default:
return 2
func getBgColor() -> Color {
if bgValueInMgDl >= urgentHighLimitInMgDl || bgValueInMgDl <= urgentLowLimitInMgDl {
return .red
} else if bgValueInMgDl >= highLimitInMgDl || bgValueInMgDl <= lowLimitInMgDl {
return .yellow
} else {
return .green
}
}
func getBgTitle() -> String {
if bgValueInMgDl >= highLimitInMgDl {
return Texts_Widget.HIGH
} else if bgValueInMgDl <= lowLimitInMgDl {
return Texts_Widget.LOW
} else {
return ""
}
}
}
// Fixed non-changing properties about your activity go here!
var bgValueUnitString: String
var eventStartDate: Date
}

View File

@ -1,31 +1,31 @@
import Foundation
// all common texts
class Texts {
static private let filename = "Common"
class Texts_Widget {
static private let filename = "TextsWidget"
static let minutes = {
return NSLocalizedString("common_minutes", tableName: filename, bundle: Bundle.main, value: "mins", comment: "literal translation needed")
return NSLocalizedString("widget_minutes", tableName: filename, bundle: Bundle.main, value: "mins", comment: "literal translation needed")
}()
static let minute = {
return NSLocalizedString("common_minute", tableName: filename, bundle: Bundle.main, value: "min", comment: "literal translation needed")
return NSLocalizedString("widget_minute", tableName: filename, bundle: Bundle.main, value: "min", comment: "literal translation needed")
}()
static let HIGH = {
return NSLocalizedString("common_high", tableName: filename, bundle: Bundle.main, value: "HIGH", comment: "the word HIGH, in capitals")
return NSLocalizedString("widget_high", tableName: filename, bundle: Bundle.main, value: "HIGH", comment: "the word HIGH, in capitals")
}()
static let LOW = {
return NSLocalizedString("common_low", tableName: filename, bundle: Bundle.main, value: "LOW", comment: "the word LOW, in capitals")
return NSLocalizedString("widget_low", tableName: filename, bundle: Bundle.main, value: "LOW", comment: "the word LOW, in capitals")
}()
static let mgdl: String = {
return NSLocalizedString("common_mgdl", tableName: filename, bundle: Bundle.main, value: "mg/dL", comment: "mg/dL")
return NSLocalizedString("widget_mgdl", tableName: filename, bundle: Bundle.main, value: "mg/dL", comment: "mg/dL")
}()
static let mmol: String = {
return NSLocalizedString("common_mmol", tableName: filename, bundle: Bundle.main, value: "mmol/L", comment: "mmol/L")
return NSLocalizedString("widget_mmol", tableName: filename, bundle: Bundle.main, value: "mmol/L", comment: "mmol/L")
}()
static let ago:String = {

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "مرتفع";
"common_low" = "منخفض";
"common_minutes" = "دقائق";
"common_minute" = "دقيقة";
"ago" = "مضت";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "مرتفع";
"widget_low" = "منخفض";
"widget_minutes" = "دقائق";
"widget_minute" = "دقيقة";
"ago" = "مضت";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "HIGH";
"common_low" = "LOW";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "ago";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "HIGH";
"widget_low" = "LOW";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "ago";

View File

@ -1,20 +1,20 @@
/// literal translation needed
"common_minute" = "min";
"widget_minute" = "min";
/// the word HIGH, in capitals
"common_high" = "HOCH";
"widget_high" = "HOCH";
/// the word LOW, in capitals
"common_low" = "NIEDRIG";
"widget_low" = "NIEDRIG";
/// literal translation needed
"common_minutes" = "Minuten";
"widget_minutes" = "Minuten";
/// mmol/l
"common_mmol" = "mmol/L";
"widget_mmol" = "mmol/L";
/// mg/dl
"common_mgdl" = "mg/dL";
"widget_mgdl" = "mg/dL";
/// where it say how old the reading is, 'x minutes ago', literaly translation of 'ago'
"ago" = "her";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "ΥΨΗΛΗ";
"common_low" = "ΧΑΜΗΛΗ";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "πριν";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "ΥΨΗΛΗ";
"widget_low" = "ΧΑΜΗΛΗ";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "πριν";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "HIGH";
"common_low" = "LOW";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "ago";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "HIGH";
"widget_low" = "LOW";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "HIGH";
"common_low" = "LOW";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "ago";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "HIGH";
"widget_low" = "LOW";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "KORKEA";
"common_low" = "MATALA";
"common_minutes" = "minuuttia";
"common_minute" = "min";
"ago" = "sitten";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "KORKEA";
"widget_low" = "MATALA";
"widget_minutes" = "minuuttia";
"widget_minute" = "min";
"ago" = "sitten";

View File

@ -1,8 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "HAUT";
"common_low" = "BAS";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "depuis";

View File

@ -0,0 +1,8 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "HAUT";
"widget_low" = "BAS";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "depuis";

View File

@ -4,22 +4,22 @@
/////////////////////////////////////////////////////////////////////////////////////////////
/// literal translation needed
"common_minute" = "min";
"widget_minute" = "min";
/// the word HIGH, in capitals
"common_high" = "HIGH";
"widget_high" = "HIGH";
/// the word LOW, in capitals
"common_low" = "LOW";
"widget_low" = "LOW";
/// literal translation needed
"common_minutes" = "mins";
"widget_minutes" = "mins";
/// mmol/l
"common_mmol" = "mmol/L";
"widget_mmol" = "mmol/L";
/// mg/dl
"common_mgdl" = "mg/dL";
"widget_mgdl" = "mg/dL";
/// where it say how old the reading is, 'x minutes ago', literaly translation of 'ago'
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_high" = "HOOG";
"common_low" = "LAAG";
"common_minute" = "min";
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_minutes" = "min";
"ago" = "geleden";

View File

@ -0,0 +1,7 @@
"widget_high" = "HOOG";
"widget_low" = "LAAG";
"widget_minute" = "min";
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_minutes" = "min";
"ago" = "geleden";

View File

@ -4,22 +4,22 @@
/////////////////////////////////////////////////////////////////////////////////////////////
/// literal translation needed
"common_minute" = "min";
"widget_minute" = "min";
/// the word HIGH, in capitals
"common_high" = "HIGH";
"widget_high" = "HIGH";
/// the word LOW, in capitals
"common_low" = "LOW";
"widget_low" = "LOW";
/// literal translation needed
"common_minutes" = "mins";
"widget_minutes" = "mins";
/// mmol/l
"common_mmol" = "mmol/L";
"widget_mmol" = "mmol/L";
/// mg/dl
"common_mgdl" = "mg/dL";
"widget_mgdl" = "mg/dL";
/// where it say how old the reading is, 'x minutes ago', literaly translation of 'ago'
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "ALTA";
"common_low" = "BAIXA";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "ago";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "ALTA";
"widget_low" = "BAIXA";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "ВЫСОКИЙ";
"common_low" = "НИЗКИЙ";
"common_minutes" = "мин";
"common_minute" = "мин";
"ago" = "назад";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "ВЫСОКИЙ";
"widget_low" = "НИЗКИЙ";
"widget_minutes" = "мин";
"widget_minute" = "мин";
"ago" = "назад";

View File

@ -4,22 +4,22 @@
/////////////////////////////////////////////////////////////////////////////////////////////
/// literal translation needed
"common_minute" = "min";
"widget_minute" = "min";
/// the word HIGH, in capitals
"common_high" = "HIGH";
"widget_high" = "HIGH";
/// the word LOW, in capitals
"common_low" = "LOW";
"widget_low" = "LOW";
/// literal translation needed
"common_minutes" = "mins";
"widget_minutes" = "mins";
/// mmol/l
"common_mmol" = "mmol/L";
"widget_mmol" = "mmol/L";
/// mg/dl
"common_mgdl" = "mg/dL";
"widget_mgdl" = "mg/dL";
/// where it say how old the reading is, 'x minutes ago', literaly translation of 'ago'
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "HÖGT";
"common_low" = "LÅGT";
"common_minutes" = "min";
"common_minute" = "min";
"ago" = "sedan";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "HÖGT";
"widget_low" = "LÅGT";
"widget_minutes" = "min";
"widget_minute" = "min";
"ago" = "sedan";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "HIGH";
"common_low" = "LOW";
"common_minutes" = "mins";
"common_minute" = "min";
"ago" = "ago";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "HIGH";
"widget_low" = "LOW";
"widget_minutes" = "mins";
"widget_minute" = "min";
"ago" = "ago";

View File

@ -1,7 +0,0 @@
"common_mgdl" = "mg/dL";
"common_mmol" = "mmol/L";
"common_high" = "高";
"common_low" = "低";
"common_minutes" = "分钟";
"common_minute" = "分钟";
"ago" = "之前";

View File

@ -0,0 +1,7 @@
"widget_mgdl" = "mg/dL";
"widget_mmol" = "mmol/L";
"widget_high" = "高";
"widget_low" = "低";
"widget_minutes" = "分钟";
"widget_minute" = "分钟";
"ago" = "之前";

View File

@ -16,21 +16,21 @@ struct XDripWidgetLiveActivity: Widget {
// Lock screen/banner UI goes here
VStack {
HStack {
Text(context.state.eventType.title).foregroundStyle(getBgColor(bgColorInt: context.state.bgValueColorInt, isTitle: true))
Text(context.state.getBgTitle()).foregroundStyle(context.state.getBgColor())
Spacer()
Text("\(context.state.bgValueString) \(context.state.trendArrow)").foregroundStyle(getBgColor(bgColorInt: context.state.bgValueColorInt, isTitle: false))
}.font(.largeTitle).bold().foregroundStyle(getBgColor(bgColorInt: context.state.bgValueColorInt, isTitle: false))
Text("\(context.state.bgValueStringInUserChosenUnit) \(context.state.trendArrow)").foregroundStyle(context.state.getBgColor())
}.font(.largeTitle).bold().foregroundStyle(context.state.getBgColor())
HStack {
Text("Started \(context.attributes.eventStartDate.formatted(date: .omitted, time: .shortened))")
Spacer()
Text(context.attributes.bgValueUnitString)
Text(context.state.bgUnitString)
.foregroundStyle(.gray)
}
.font(.headline)
Spacer()
HStack {
Text(context.state.eventType.explanation)
Text("Message")
}
.font(.body)
Spacer()
@ -41,18 +41,20 @@ struct XDripWidgetLiveActivity: Widget {
//.background(.ultraThinMaterial)
//.activityBackgroundTint(Color.red)
//.activitySystemActionForegroundColor(Color.black)
} dynamicIsland: { context in
DynamicIsland {
// Expanded UI goes here. Compose the expanded UI through
// various regions, like leading/trailing/center/bottom
DynamicIslandExpandedRegion(.leading) {
Text(context.state.eventType.title)
.font(.largeTitle).bold().foregroundStyle(getBgColor(bgColorInt: context.state.eventType.bgColorInt, isTitle: true))
Text(context.state.getBgTitle())
.font(.largeTitle).bold().foregroundStyle(context.state.getBgColor())
}
DynamicIslandExpandedRegion(.trailing) {
Text("\(context.state.bgValueString) \(context.state.trendArrow) ")
.font(.largeTitle).bold().foregroundStyle(getBgColor(bgColorInt: context.state.eventType.bgColorInt, isTitle: false))
Text("\(context.state.bgValueStringInUserChosenUnit) \(context.state.trendArrow)")
.font(.largeTitle).bold().foregroundStyle(context.state.getBgColor())
}
DynamicIslandExpandedRegion(.center) {
EmptyView()
@ -62,49 +64,37 @@ struct XDripWidgetLiveActivity: Widget {
HStack {
Text("Started \(context.attributes.eventStartDate.formatted(date: .omitted, time: .shortened))")
Spacer()
Text(context.attributes.bgValueUnitString)
Text(context.state.bgUnitString)
.foregroundStyle(.gray)
}
.font(.headline)
Spacer()
HStack {
Text(context.state.eventType.explanation)
Text("Message")
}
.font(.body)
Spacer()
}
}
} compactLeading: {
Text(context.state.eventType.title)
Text(context.state.getBgTitle()).foregroundStyle(context.state.getBgColor())
} compactTrailing: {
Text("\(context.state.bgValueString) \(context.state.trendArrow)")
Text("\(context.state.bgValueStringInUserChosenUnit) \(context.state.trendArrow)").foregroundStyle(context.state.getBgColor())
} minimal: {
Text(context.state.bgValueString)
.foregroundStyle(getBgColor(bgColorInt: context.state.eventType.bgColorInt, isTitle: false))
Text("\(context.state.bgValueStringInUserChosenUnit)")
.foregroundStyle(context.state.getBgColor())
}
.widgetURL(URL(string: "xdripswift"))
}
}
func getBgColor(bgColorInt: Int, isTitle: Bool) -> Color {
switch bgColorInt {
case 1:
return .red
case 2:
return isTitle ? .primary : .green
case 3:
return .yellow
default:
return .green
}
}
}
@available(iOS 16.2, *)
struct XDripWidgetLiveActivity_Previews: PreviewProvider {
static let attributes = XDripWidgetAttributes(bgValueUnitString: "mg/dL", eventStartDate: Date().addingTimeInterval(-1000))
static let contentState = XDripWidgetAttributes.ContentState(eventType: .inRangeDropping, trendArrow: "", bgValueString: "134")
static let attributes = XDripWidgetAttributes(eventStartDate: Date().addingTimeInterval(-1000))
static let contentState = XDripWidgetAttributes.ContentState(bgValueInMgDl: 75, isMgDl: true, trendArrow: "", deltaChangeInMgDl: -2, urgentLowLimitInMgDl: 70, lowLimitInMgDl: 80, highLimitInMgDl: 140, urgentHighLimitInMgDl: 180)
static var previews: some View {
attributes

View File

@ -29,6 +29,12 @@
4716A4FE2B406C3F00419052 /* xDripWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 4716A4ED2B406C3D00419052 /* xDripWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
4716A5052B40709E00419052 /* XDripWidgetAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4716A5042B40709E00419052 /* XDripWidgetAttributes.swift */; };
4716A5072B4082ED00419052 /* XDripWidgetAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4716A5042B40709E00419052 /* XDripWidgetAttributes.swift */; };
4716A50A2B416E6500419052 /* Double.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4716A5092B416E6500419052 /* Double.swift */; };
4716A50D2B416EE100419052 /* ConstantsWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4716A50C2B416EE100419052 /* ConstantsWidget.swift */; };
4716A50E2B41707D00419052 /* TextsWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E53FE8251F7B8800052CE5 /* TextsWidget.swift */; };
4716A50F2B41708000419052 /* TextsWidget.strings in Resources */ = {isa = PBXBuildFile; fileRef = F8E53FD0251D35FB00052CE5 /* TextsWidget.strings */; };
4716A5102B41823600419052 /* TextsWidget.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8E53FE8251F7B8800052CE5 /* TextsWidget.swift */; };
4716A5112B41823A00419052 /* TextsWidget.strings in Resources */ = {isa = PBXBuildFile; fileRef = F8E53FD0251D35FB00052CE5 /* TextsWidget.strings */; };
47228B152996BDD2008725DB /* BgReadingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47228B142996BDD2008725DB /* BgReadingsView.swift */; };
4733B93E2AD17C99001D609D /* FollowerBgReading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4733B93D2AD17C99001D609D /* FollowerBgReading.swift */; };
4733B9402AD17D15001D609D /* FollowerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4733B93F2AD17D15001D609D /* FollowerDelegate.swift */; };
@ -618,7 +624,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
198D44C3260A3A3300A2B4A2 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Common.strings; sourceTree = "<group>"; };
198D44C3260A3A3300A2B4A2 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/TextsWidget.strings; sourceTree = "<group>"; };
198D44C4260A3A3300A2B4A2 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Alerts.strings; sourceTree = "<group>"; };
198D44C5260A3A3300A2B4A2 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/AlertTypesSettingsView.strings; sourceTree = "<group>"; };
198D44C6260A3A3300A2B4A2 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/BluetoothPeripheralsView.strings; sourceTree = "<group>"; };
@ -642,7 +648,7 @@
198D44E7260A822000A2B4A2 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Main.strings; sourceTree = "<group>"; };
2867F5C825BC209400AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
2867F5C925BC209500AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Main.strings; sourceTree = "<group>"; };
2867F5CA25BC209500AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Common.strings; sourceTree = "<group>"; };
2867F5CA25BC209500AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/TextsWidget.strings; sourceTree = "<group>"; };
2867F5CB25BC209500AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Alerts.strings; sourceTree = "<group>"; };
2867F5CC25BC209500AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/AlertTypesSettingsView.strings; sourceTree = "<group>"; };
2867F5CD25BC209500AA1E98 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/BluetoothPeripheralsView.strings; sourceTree = "<group>"; };
@ -663,7 +669,7 @@
4166BFB628C3501400199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Interface.strings; sourceTree = "<group>"; };
4166BFB728C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
4166BFB828C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Main.strings; sourceTree = "<group>"; };
4166BFB928C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Common.strings; sourceTree = "<group>"; };
4166BFB928C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/TextsWidget.strings; sourceTree = "<group>"; };
4166BFBA28C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Treatments.strings; sourceTree = "<group>"; };
4166BFBB28C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Alerts.strings; sourceTree = "<group>"; };
4166BFBC28C3501500199980 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/AlertTypesSettingsView.strings; sourceTree = "<group>"; };
@ -706,6 +712,8 @@
4716A4F92B406C3F00419052 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4716A4FB2B406C3F00419052 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4716A5042B40709E00419052 /* XDripWidgetAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XDripWidgetAttributes.swift; sourceTree = "<group>"; };
4716A5092B416E6500419052 /* Double.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Double.swift; sourceTree = "<group>"; };
4716A50C2B416EE100419052 /* ConstantsWidget.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsWidget.swift; sourceTree = "<group>"; };
47228B142996BDD2008725DB /* BgReadingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BgReadingsView.swift; sourceTree = "<group>"; };
4733B93D2AD17C99001D609D /* FollowerBgReading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowerBgReading.swift; sourceTree = "<group>"; };
4733B93F2AD17D15001D609D /* FollowerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowerDelegate.swift; sourceTree = "<group>"; };
@ -776,7 +784,7 @@
CE1B2FDD25D0264B00F642F5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/M5StackView.strings; sourceTree = "<group>"; };
CE1B2FDE25D0264B00F642F5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Snooze.strings; sourceTree = "<group>"; };
CE1B2FDF25D0264B00F642F5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/BluetoothPeripheralView.strings; sourceTree = "<group>"; };
CE1B2FE425D026B400F642F5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Common.strings; sourceTree = "<group>"; };
CE1B2FE425D026B400F642F5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/TextsWidget.strings; sourceTree = "<group>"; };
D400F8022778BD8000B57648 /* TextsTreatmentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextsTreatmentsView.swift; sourceTree = "<group>"; };
D4028CBF2774A50600341476 /* TreatmentsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreatmentsViewController.swift; sourceTree = "<group>"; };
D40C3DA3277542C400111B73 /* TreatmentEntry+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TreatmentEntry+CoreDataClass.swift"; sourceTree = "<group>"; };
@ -924,7 +932,7 @@
F81F39EB25C616C900520946 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LibreNFC.strings; sourceTree = "<group>"; };
F81F3A6025C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
F81F3A6125C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Main.strings; sourceTree = "<group>"; };
F81F3A6225C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Common.strings; sourceTree = "<group>"; };
F81F3A6225C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F81F3A6325C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Alerts.strings; sourceTree = "<group>"; };
F81F3A6425C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/AlertTypesSettingsView.strings; sourceTree = "<group>"; };
F81F3A6525C9E5A800520946 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/BluetoothPeripheralsView.strings; sourceTree = "<group>"; };
@ -1222,11 +1230,11 @@
F88EC12325F6CFB200DF0EAF /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/SettingsViews.strings; sourceTree = "<group>"; };
F88EC12425F6CFC200DF0EAF /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/WatlaaView.strings; sourceTree = "<group>"; };
F88EC12525F6CFC500DF0EAF /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/WatlaaView.strings; sourceTree = "<group>"; };
F88EC17325FABAAE00DF0EAF /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Common.strings; sourceTree = "<group>"; };
F88EC17425FABAB000DF0EAF /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Common.strings; sourceTree = "<group>"; };
F88EC17525FABAB300DF0EAF /* pl-PL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pl-PL"; path = "pl-PL.lproj/Common.strings"; sourceTree = "<group>"; };
F88EC17625FABAB700DF0EAF /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Common.strings; sourceTree = "<group>"; };
F88EC17725FABAB800DF0EAF /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/Common.strings; sourceTree = "<group>"; };
F88EC17325FABAAE00DF0EAF /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F88EC17425FABAB000DF0EAF /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F88EC17525FABAB300DF0EAF /* pl-PL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pl-PL"; path = "pl-PL.lproj/TextsWidget.strings"; sourceTree = "<group>"; };
F88EC17625FABAB700DF0EAF /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F88EC17725FABAB800DF0EAF /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F88EC279260120C000DF0EAF /* ConstantsAlerts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsAlerts.swift; sourceTree = "<group>"; };
F890E079247687AE008FB2EC /* URL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URL.swift; sourceTree = "<group>"; };
F897AAF82200F2D200CDDD10 /* CBPeripheralState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBPeripheralState.swift; sourceTree = "<group>"; };
@ -1430,7 +1438,7 @@
F8CB59CD27444D6300BA199E /* DexcomSessionStopResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DexcomSessionStopResponse.swift; sourceTree = "<group>"; };
F8CB59D2274D94AE00BA199E /* DexcomSessionStartTxMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DexcomSessionStartTxMessage.swift; sourceTree = "<group>"; };
F8D0587B24BCB570008C8734 /* SettingsViewHomeScreenSettingsViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewHomeScreenSettingsViewModel.swift; sourceTree = "<group>"; };
F8D094EB2846BDD50087FFEA /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Common.strings; sourceTree = "<group>"; };
F8D094EB2846BDD50087FFEA /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8D094EC2846BDD50087FFEA /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Treatments.strings; sourceTree = "<group>"; };
F8D094ED2846BDD50087FFEA /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Alerts.strings; sourceTree = "<group>"; };
F8D094EE2846BDD50087FFEA /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/AlertTypesSettingsView.strings; sourceTree = "<group>"; };
@ -1466,7 +1474,7 @@
F8E4DCD92805F7FA007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Interface.strings; sourceTree = "<group>"; };
F8E4DCDA2805F7FA007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
F8E4DCDB2805F7FA007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Main.strings; sourceTree = "<group>"; };
F8E4DCDC2805F7FA007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Common.strings; sourceTree = "<group>"; };
F8E4DCDC2805F7FA007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8E4DCDD2805F7FB007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Treatments.strings; sourceTree = "<group>"; };
F8E4DCDE2805F7FB007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Alerts.strings; sourceTree = "<group>"; };
F8E4DCDF2805F7FB007CF822 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/AlertTypesSettingsView.strings; sourceTree = "<group>"; };
@ -1495,12 +1503,12 @@
F8E51D66244BAE0E001C9E5A /* WatlaaBluetoothTransmitterMaster+CGMTransmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "WatlaaBluetoothTransmitterMaster+CGMTransmitter.swift"; sourceTree = "<group>"; };
F8E51D6824549E2C001C9E5A /* SettingsViewTraceSettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewTraceSettingsViewModel.swift; sourceTree = "<group>"; };
F8E53FBC2517F96800052CE5 /* Date.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Date.swift; sourceTree = "<group>"; };
F8E53FCF251D35FB00052CE5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Common.strings; sourceTree = "<group>"; };
F8E53FD1251D360200052CE5 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Common.strings; sourceTree = "<group>"; };
F8E53FD2251D360300052CE5 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Common.strings; sourceTree = "<group>"; };
F8E53FD3251D361600052CE5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Common.strings; sourceTree = "<group>"; };
F8E53FD7251D363B00052CE5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Common.strings; sourceTree = "<group>"; };
F8E53FE8251F7B8800052CE5 /* Common.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = "<group>"; };
F8E53FCF251D35FB00052CE5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8E53FD1251D360200052CE5 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8E53FD2251D360300052CE5 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8E53FD3251D361600052CE5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8E53FD7251D363B00052CE5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/TextsWidget.strings; sourceTree = "<group>"; };
F8E53FE8251F7B8800052CE5 /* TextsWidget.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextsWidget.swift; sourceTree = "<group>"; };
F8E5404B2522624800052CE5 /* ConstantsHousekeeping.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantsHousekeeping.swift; sourceTree = "<group>"; };
F8E6C78B24CDDB83007C1199 /* SnoozeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnoozeViewController.swift; sourceTree = "<group>"; };
F8E6C78F24CEC22A007C1199 /* TextsSnooze.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextsSnooze.swift; sourceTree = "<group>"; };
@ -1645,6 +1653,7 @@
4716A4F32B406C3D00419052 /* XDripWidgetBundle.swift */,
4716A4F52B406C3D00419052 /* XDripWidgetLiveActivity.swift */,
4716A4F92B406C3F00419052 /* Assets.xcassets */,
4716A50B2B416ECF00419052 /* Constants */,
F870D3EF25149EA0008967B0 /* Extensions */,
4716A5032B40704000419052 /* Models */,
4716A5022B40702D00419052 /* Texts */,
@ -1655,8 +1664,8 @@
4716A5022B40702D00419052 /* Texts */ = {
isa = PBXGroup;
children = (
F8E53FE8251F7B8800052CE5 /* Common.swift */,
F8E53FD0251D35FB00052CE5 /* Common.strings */,
F8E53FE8251F7B8800052CE5 /* TextsWidget.swift */,
F8E53FD0251D35FB00052CE5 /* TextsWidget.strings */,
);
path = Texts;
sourceTree = "<group>";
@ -1670,6 +1679,14 @@
path = Models;
sourceTree = "<group>";
};
4716A50B2B416ECF00419052 /* Constants */ = {
isa = PBXGroup;
children = (
4716A50C2B416EE100419052 /* ConstantsWidget.swift */,
);
path = Constants;
sourceTree = "<group>";
};
47DB06CC2A7013EF00267BE3 /* Followers */ = {
isa = PBXGroup;
children = (
@ -2219,6 +2236,7 @@
isa = PBXGroup;
children = (
F8E53FBC2517F96800052CE5 /* Date.swift */,
4716A5092B416E6500419052 /* Double.swift */,
);
path = Extensions;
sourceTree = "<group>";
@ -3359,6 +3377,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4716A50F2B41708000419052 /* TextsWidget.strings in Resources */,
4716A4FA2B406C3F00419052 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -3417,6 +3436,7 @@
F824379524CB7A9900BED341 /* Pager_Beeps.caf in Resources */,
F8B3A7CD226CC0B7004BA588 /* shorthigh3.caf in Resources */,
F824376A24CB7A9800BED341 /* Martian_Gun.caf in Resources */,
4716A5112B41823A00419052 /* TextsWidget.strings in Resources */,
F824378824CB7A9900BED341 /* Insistently.caf in Resources */,
F82437B924CB7A9900BED341 /* Siri_Alert_Transmitter_Battery_Low.caf in Resources */,
F8B3A7D0226CC0B7004BA588 /* modernalarm.caf in Resources */,
@ -3543,7 +3563,10 @@
4716A5052B40709E00419052 /* XDripWidgetAttributes.swift in Sources */,
4716A4F62B406C3D00419052 /* XDripWidgetLiveActivity.swift in Sources */,
4716A4F42B406C3D00419052 /* XDripWidgetBundle.swift in Sources */,
4716A50A2B416E6500419052 /* Double.swift in Sources */,
4716A4F82B406C3D00419052 /* XDripWidget.swift in Sources */,
4716A50D2B416EE100419052 /* ConstantsWidget.swift in Sources */,
4716A50E2B41707D00419052 /* TextsWidget.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -3862,6 +3885,7 @@
F8A2BC2D25DB0D6D001D1E78 /* BluetoothPeripheralManager+CGMG5TransmitterDelegate.swift in Sources */,
47DB06E72A715EC500267BE3 /* ConstantsLibreLinkUp.swift in Sources */,
F8FDFEA9260DE1A70047597D /* DTCustomColoredAccessory.m in Sources */,
4716A5102B41823600419052 /* TextsWidget.swift in Sources */,
F8B3A7DF226E48C1004BA588 /* SoundPlayer.swift in Sources */,
D48E8F78278E49B300CCEE08 /* TreatmentNSResponse.swift in Sources */,
F816E12C2439DFBA009EE65B /* DexcomG4+CoreDataProperties.swift in Sources */,
@ -4485,7 +4509,7 @@
name = SettingsViews.strings;
sourceTree = "<group>";
};
F8E53FD0251D35FB00052CE5 /* Common.strings */ = {
F8E53FD0251D35FB00052CE5 /* TextsWidget.strings */ = {
isa = PBXVariantGroup;
children = (
F8E53FCF251D35FB00052CE5 /* en */,
@ -4506,7 +4530,7 @@
F8D094EB2846BDD50087FFEA /* uk */,
4166BFB928C3501500199980 /* el */,
);
name = Common.strings;
name = TextsWidget.strings;
sourceTree = "<group>";
};
F8E6C79324CEC2E3007C1199 /* Snooze.strings */ = {