mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 00:51:47 +01:00
Fixed dialog callbacks not working on a11 and under when blurbehind window is used
This commit is contained in:
parent
29c6c892c7
commit
5c0ccde9fa
@ -429,17 +429,21 @@ fun Dialog.blurBehindWindow(
|
|||||||
onDismiss: DialogInterface.OnDismissListener? = null,
|
onDismiss: DialogInterface.OnDismissListener? = null,
|
||||||
onCancel: DialogInterface.OnCancelListener? = null
|
onCancel: DialogInterface.OnCancelListener? = null
|
||||||
) {
|
) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
||||||
setOnShowListener {
|
setOnShowListener {
|
||||||
onShow?.onShow(it)
|
onShow?.onShow(it)
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
window?.decorView?.animateBlur(1f, blurAmount, 50)?.start()
|
window?.decorView?.animateBlur(1f, blurAmount, 50)?.start()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
setOnDismissListener {
|
setOnDismissListener {
|
||||||
onDismiss?.onDismiss(it)
|
onDismiss?.onDismiss(it)
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
window?.decorView?.animateBlur(blurAmount, 1f, 50, true)?.start()
|
window?.decorView?.animateBlur(blurAmount, 1f, 50, true)?.start()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
setOnCancelListener {
|
setOnCancelListener {
|
||||||
onCancel?.onCancel(it)
|
onCancel?.onCancel(it)
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
window?.decorView?.animateBlur(blurAmount, 1f, 50, true)?.start()
|
window?.decorView?.animateBlur(blurAmount, 1f, 50, true)?.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user