mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
feat: onboarding refresh (#2551)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c1408816a4
commit
2c6751a574
28 changed files with 2795 additions and 2513 deletions
|
|
@ -255,6 +255,11 @@ constructor(
|
|||
_spinner.value = false
|
||||
}
|
||||
|
||||
fun refreshPermissions() {
|
||||
// Refresh the Bluetooth state to ensure we have the latest permissions
|
||||
bluetoothRepository.refreshState()
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
fun startScan() {
|
||||
debug("starting classic scan")
|
||||
|
|
@ -292,7 +297,8 @@ constructor(
|
|||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
private fun requestBonding(device: BluetoothDevice) {
|
||||
private fun requestBonding(it: DeviceListEntry) {
|
||||
val device = bluetoothRepository.getRemoteDevice(it.address) ?: return
|
||||
info("Starting bonding for ${device.anonymize}")
|
||||
|
||||
bluetoothRepository
|
||||
|
|
@ -350,7 +356,7 @@ constructor(
|
|||
changeDeviceAddress(it.fullAddress)
|
||||
true
|
||||
} else {
|
||||
requestBonding(it.device)
|
||||
requestBonding(it)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue