mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Don't disconnect after oat reboot message
Sort BLE devices alphabetically by name
This commit is contained in:
parent
b747634d4e
commit
c0586f71e3
2 changed files with 2 additions and 4 deletions
|
|
@ -160,7 +160,7 @@ struct Connect: View {
|
|||
|
||||
if !self.bleManager.isConnected {
|
||||
Section(header: Text("available.radios").font(.title)) {
|
||||
ForEach(bleManager.peripherals.filter({ $0.peripheral.state == CBPeripheralState.disconnected }).sorted(by: { $0.name > $1.name })) { peripheral in
|
||||
ForEach(bleManager.peripherals.filter({ $0.peripheral.state == CBPeripheralState.disconnected }).sorted(by: { $0.name < $1.name })) { peripheral in
|
||||
HStack {
|
||||
if userSettings.preferredPeripheralId == peripheral.peripheral.identifier.uuidString {
|
||||
Image(systemName: "star.fill")
|
||||
|
|
|
|||
|
|
@ -78,9 +78,7 @@ struct Firmware: View {
|
|||
if connectedNode != nil {
|
||||
if !bleManager.sendRebootOta(fromUser: connectedNode!.user!, toUser: node!.user!, adminIndex: connectedNode!.myInfo!.adminIndex) {
|
||||
print("Reboot Failed")
|
||||
} else {
|
||||
bleManager.disconnectPeripheral(reconnect: false)
|
||||
}
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label("Send Reboot OTA", systemImage: "square.and.arrow.down")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue