mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix incorrect logic in saving bluetooth setting
This commit is contained in:
parent
798a8f0b5e
commit
1f99878e2b
@ -217,13 +217,13 @@ private class VoiceInputActionWindow(
|
|||||||
override fun recordingStarted(device: MicrophoneDeviceState) {
|
override fun recordingStarted(device: MicrophoneDeviceState) {
|
||||||
if (shouldPlaySounds) {
|
if (shouldPlaySounds) {
|
||||||
state.soundPlayer.playStartSound()
|
state.soundPlayer.playStartSound()
|
||||||
|
}
|
||||||
|
|
||||||
// Only set the setting if bluetooth is available, else it would reset the setting
|
// Only set the setting if bluetooth is available, else it would reset the setting
|
||||||
// every time it's used without a bluetooth device connected.
|
// every time it's used without a bluetooth device connected.
|
||||||
if(device.bluetoothAvailable) {
|
if(device.bluetoothAvailable) {
|
||||||
manager.getLifecycleScope().launch {
|
manager.getLifecycleScope().launch {
|
||||||
context.setSetting(PREFER_BLUETOOTH, device.bluetoothActive)
|
context.setSetting(PREFER_BLUETOOTH, device.bluetoothActive)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user