mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-05 13:22:59 -05:00
clean up snackbar
This commit is contained in:
@@ -156,7 +156,7 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
|
||||
requireActivity().startActivity(shareIntent)
|
||||
} catch (ex: ActivityNotFoundException) {
|
||||
Snackbar.make(
|
||||
binding.shareButton,
|
||||
requireView(),
|
||||
R.string.no_app_found,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
@@ -179,7 +179,7 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
|
||||
|
||||
// Tell the user to try again
|
||||
Snackbar.make(
|
||||
binding.editableCheckbox,
|
||||
requireView(),
|
||||
R.string.radio_sleeping,
|
||||
Snackbar.LENGTH_SHORT
|
||||
).show()
|
||||
|
||||
@@ -899,7 +899,7 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
||||
fun weNeedAccess(warningReason: String) {
|
||||
warn("Telling user we need need location access")
|
||||
|
||||
Snackbar.make(binding.changeRadioButton, warningReason, Snackbar.LENGTH_INDEFINITE)
|
||||
Snackbar.make(requireView(), warningReason, Snackbar.LENGTH_INDEFINITE)
|
||||
.apply { view.findViewById<TextView>(R.id.snackbar_text).isSingleLine = false }
|
||||
.setAction(R.string.okay) {
|
||||
// dismiss
|
||||
@@ -969,7 +969,7 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
||||
// Warn user if BLE is disabled
|
||||
if (scanModel.bluetoothAdapter?.isEnabled != true) {
|
||||
Snackbar.make(
|
||||
binding.changeRadioButton,
|
||||
requireView(),
|
||||
R.string.error_bluetooth,
|
||||
Snackbar.LENGTH_INDEFINITE
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user