Changes how bluetooth state is checked for bluetooth check.

Co-authored-by: Andre K <andrekir@pm.me>
This commit is contained in:
legendgroupv2 2022-08-30 10:45:54 +01:00 committed by GitHub
parent e4b2649807
commit 1251c76ff0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -506,10 +506,7 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
private fun checkBTEnabled(
warningReason: String = getString(R.string.requires_bluetooth)
) {
var btAdapter = BluetoothAdapter.getDefaultAdapter();
if (!(btAdapter.isEnabled())) {
if (bluetoothViewModel.enabled.value == false) {
warn("We need bluetooth")
showSnackbar(warningReason)
}