mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-06 22:02:37 -05:00
add bluetooth config proto
This commit is contained in:
@@ -61,6 +61,7 @@ class LocalConfigRepository @Inject constructor(
|
||||
if (config.hasWifi()) setWifiConfig(config.wifi)
|
||||
if (config.hasDisplay()) setDisplayConfig(config.display)
|
||||
if (config.hasLora()) setLoraConfig(config.lora)
|
||||
if (config.hasBluetooth()) setBluetoothConfig(config.bluetooth)
|
||||
}
|
||||
|
||||
private suspend fun setDeviceConfig(config: ConfigProtos.Config.DeviceConfig) {
|
||||
@@ -99,6 +100,12 @@ class LocalConfigRepository @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun setBluetoothConfig(config: ConfigProtos.Config.BluetoothConfig) {
|
||||
localConfigStore.updateData { preference ->
|
||||
preference.toBuilder().setBluetooth(config).build()
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun fetchInitialLocalConfig() = localConfigStore.data.first()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user