mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
use let
This commit is contained in:
parent
98df2c2cff
commit
e9a5f29dcc
1 changed files with 8 additions and 7 deletions
|
@ -727,14 +727,15 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
} else {
|
} else {
|
||||||
setKey("jsdelivr_proxy_key", true)
|
setKey("jsdelivr_proxy_key", true)
|
||||||
val parentView = findViewById(android.R.id.content)
|
val parentView = findViewById(android.R.id.content)
|
||||||
Snackbar.make(parentView, R.string.jsdelivr_enabled, Snackbar.LENGTH_LONG)
|
Snackbar.make(parentView, R.string.jsdelivr_enabled, Snackbar.LENGTH_LONG).let { snackbar ->
|
||||||
.setAction(R.string.revert, v -> {
|
snackbar.setAction(R.string.revert) { v ->
|
||||||
setKey("jsdelivr_proxy_key", false)
|
setKey("jsdelivr_proxy_key", false)
|
||||||
})
|
}
|
||||||
.setBackgroundTint(colorFromAttribute(R.attr.primaryGrayBackground))
|
snackbar.setBackgroundTint(colorFromAttribute(R.attr.primaryGrayBackground))
|
||||||
.setTextColor(colorFromAttribute(R.attr.textColor))
|
snackbar.setTextColor(colorFromAttribute(R.attr.textColor))
|
||||||
.setActionTextColor(colorFromAttribute(R.attr.colorPrimary))
|
snackbar.setActionTextColor(colorFromAttribute(R.attr.colorPrimary))
|
||||||
.show()
|
snackbar.show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue