You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iflet first = deviceManager.watches.first, deviceManager.watches.count <=1{
206
-
// Switch to the user's next watch
207
-
pairedDeviceID = first.uuid
208
-
}else{
209
-
// The user doesn't have another watch, this will show the welcome view
210
-
pairedDeviceID =nil
211
-
}
212
-
213
-
log("Unpaired from \(pairedDevice?.name ??"InfiniTime")", type:.info, caller:"BLEManager", target:.ble)
214
-
215
-
if device ==nil{
216
-
// FIXME: this only disconnects and removes the watch from the recognized device list in the app. If using secure pairing, iOS will still keep the bond
217
-
disconnect()
218
-
startScanning()
219
-
}
195
+
iflet pairedDevice {
196
+
// Delete the device object we have said for this watch
iflet first = deviceManager.watches.first, deviceManager.watches.count <=1{
203
+
// Switch to the user's next watch
204
+
pairedDeviceID = first.uuid
205
+
}else{
206
+
// The user doesn't have another watch, this will show the welcome view
207
+
pairedDeviceID =nil
208
+
}
209
+
210
+
log("Unpaired from \(pairedDevice?.name ??"InfiniTime")", type:.info, caller:"BLEManager", target:.ble)
211
+
212
+
if device ==nil{
213
+
// FIXME: this only disconnects and removes the watch from the recognized device list in the app. If using secure pairing, iOS will still keep the bond
Text("Starting on \(startDate.formatted(.dateTime.day().month())) at \(startDate.formatted(.dateTime.hour().minute())), the exercise lasted \(timeDifferenceFormatted(startDate: startDate, endDate: userExercise.endDate!)).")
Text("Averaging at \(String(format:"%.0f",Double(heartValues.reduce(0,+))/ Double(heartValues.count))) BPM, your heart rate ranged from \(min) to \(max) BPM.")
77
+
}else{
78
+
Text("There wasn't any heart rate data recorded for this exercise.")
Text("You took \(userExercise.steps) step\(userExercise.steps ==1?"":"s") and burned \(calories >1?String(format:"%.0f", calories)+"calories":"less than one calorie").")
0 commit comments