kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
feat: Short duration for the "notification permissions denied" snackbar (#1346)
rodzic
26ca4af568
commit
abb4db8faf
|
@ -137,7 +137,7 @@ class MainActivity : AppCompatActivity(), Logging {
|
|||
info("Notification permissions granted")
|
||||
} else {
|
||||
warn("Notification permissions denied")
|
||||
showSnackbar(getString(R.string.notification_denied))
|
||||
showSnackbar(getString(R.string.notification_denied), Snackbar.LENGTH_SHORT)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -385,9 +385,9 @@ class MainActivity : AppCompatActivity(), Logging {
|
|||
}
|
||||
}
|
||||
|
||||
private fun showSnackbar(msg: String) {
|
||||
private fun showSnackbar(msg: String, duration: Int = Snackbar.LENGTH_INDEFINITE) {
|
||||
try {
|
||||
Snackbar.make(binding.root, msg, Snackbar.LENGTH_INDEFINITE)
|
||||
Snackbar.make(binding.root, msg, duration)
|
||||
.apply { view.findViewById<TextView>(R.id.snackbar_text).isSingleLine = false }
|
||||
.setAction(R.string.okay) {
|
||||
// dismiss
|
||||
|
|
Ładowanie…
Reference in New Issue