mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:39:19 +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 {
|
}
|
||||||
onDismiss?.onDismiss(it)
|
setOnDismissListener {
|
||||||
|
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 {
|
}
|
||||||
onCancel?.onCancel(it)
|
setOnCancelListener {
|
||||||
|
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