clean up snackbar

pull/372/head
andrekir 2022-02-07 21:50:31 -03:00
rodzic 45895cdcf6
commit a42ba77bf2
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -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()

Wyświetl plik

@ -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
)