mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
#38: Don't warn about bluetooth so much - just on the settings page
This commit is contained in:
parent
12c5edb0b7
commit
a69560d056
2 changed files with 10 additions and 19 deletions
|
|
@ -21,6 +21,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.RadioButton
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.lifecycle.AndroidViewModel
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
|
|
@ -748,6 +749,15 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
|||
super.onResume()
|
||||
if (!hasCompanionDeviceApi && model.bluetoothEnabled.value!!)
|
||||
scanModel.startScan()
|
||||
|
||||
// Keep reminding user BLE is still off
|
||||
if (scanModel.bluetoothAdapter?.isEnabled != true) {
|
||||
Toast.makeText(
|
||||
requireContext(),
|
||||
R.string.error_bluetooth,
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue