Skip to content

Commit

Permalink
Remove unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jeslat committed Jun 24, 2024
1 parent 71e2db9 commit aae6433
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ open class SnackbarBuilder(view: View?, text: String) {
@JvmOverloads
open fun showInformative(snackbarLength: SnackbarLength = SnackbarLength.SHORT): Snackbar {
val spannable = getSpannable(R.attr.colorTextPrimaryInverse)
val snackbar = createSnackbar(spannable, snackbarLength, isCritical = false)
val snackbar = createSnackbar(spannable, snackbarLength)
setBackgroundColor(snackbar, R.attr.colorFeedbackInfoBackground)
setActionTextColor(snackbar, R.attr.colorTextLinkSnackbar)
snackbar.show()
Expand All @@ -71,7 +71,7 @@ open class SnackbarBuilder(view: View?, text: String) {
@JvmOverloads
open fun showCritical(snackbarLength: SnackbarLength = SnackbarLength.SHORT): Snackbar {
val spannable = getSpannable(R.attr.colorTextPrimaryInverse)
val snackbar = createSnackbar(spannable, snackbarLength, isCritical = true)
val snackbar = createSnackbar(spannable, snackbarLength)
setBackgroundColor(snackbar, R.attr.colorFeedbackErrorBackground)
setActionTextColor(snackbar, R.attr.colorTextPrimaryInverse)
interruptPreviousAccessibilityAnnouncement(snackbar)
Expand Down Expand Up @@ -108,7 +108,7 @@ open class SnackbarBuilder(view: View?, text: String) {
return spannable
}

private fun createSnackbar(text: CharSequence, snackbarLength: SnackbarLength, isCritical: Boolean): Snackbar {
private fun createSnackbar(text: CharSequence, snackbarLength: SnackbarLength): Snackbar {
val duration = when {
areSticky() -> SnackbarLength.INDEFINITE
isInvalidLengthWhenThereIsAction(snackbarLength) -> SnackbarLength.LONG
Expand Down

0 comments on commit aae6433

Please sign in to comment.