Skip to content

Commit

Permalink
ble: fix watch reconnecting immediately after disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcharger committed Jan 11, 2025
1 parent 1f7d63a commit f20e048
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion InfiniLink/BLE/BLEManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
isConnectedToPinetime = false
notifyCharacteristic = nil

if pairedDeviceID != nil, pairedDeviceID == peripheral.identifier.uuidString {
if pairedDeviceID != nil, pairedDeviceID == peripheral.identifier.uuidString && error == nil {
connect(peripheral: peripheral) {}
} else if let error {
log(error.localizedDescription, caller: "didDisconnectPeripheral", target: .ble)
Expand Down
18 changes: 18 additions & 0 deletions InfiniLink/Core/Components/Charts/StepChartView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// StepChartView.swift
// InfiniLink
//
// Created by Liam Willey on 1/11/25.
//

import SwiftUI

struct StepChartView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}

#Preview {
StepChartView()
}

0 comments on commit f20e048

Please sign in to comment.