Fixed bluetooth button still visible if BT is disconnected while audio routes menu visible

This commit is contained in:
Sylvain Berfini 2020-04-02 15:07:16 +02:00
parent c70114c45d
commit a8b057c05a
2 changed files with 4 additions and 1 deletions

View file

@ -141,7 +141,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation "androidx.media:media:1.1.0"
implementation 'androidx.fragment:fragment-ktx:1.2.3'
implementation 'androidx.fragment:fragment-ktx:1.2.4'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.1'

View file

@ -293,6 +293,9 @@ class ControlsViewModel : ViewModel() {
}
}
audioRoutesEnabled.value = bluetoothDeviceAvailable
if (!bluetoothDeviceAvailable) {
audioRoutesVisibility.value = false
}
}
private fun updateBluetoothHeadsetState() {