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
2 changes: 2 additions & 0 deletions Magic Switch/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down
5 changes: 3 additions & 2 deletions Magic Switch/Model/Store/BluetoothPeripheralStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ final class BluetoothPeripheralStore: NSObject, ObservableObject, BluetoothPerip
guard validateBluetoothState() else { return }
guard validateDeviceExists(peripheral) else { return }

var newPeripheral = peripheral
let newPeripheral = peripheral
peripherals.append(newPeripheral)
// Resolve the new row's live connection state (and register its disconnect
// observer) right away. Without this the row reads `.disconnected` until
Expand Down Expand Up @@ -1617,7 +1617,8 @@ final class BluetoothPeripheralStore: NSObject, ObservableObject, BluetoothPerip
return
}

DispatchQueue.main.async {
DispatchQueue.main.async { [weak self] in
guard let self = self else { return }
// Identity, not just address, decides staleness: the newest attempt may
// not have installed its own pair yet (its preflight is still on the
// Bluetooth queue, or its peer round trip is in flight), so reading the
Expand Down