Fix Non-Activity dialog destroy problem in DialogBuilderFactory

This commit is contained in:
2022-09-30 05:16:31 +08:00
parent 4bf53efa7a
commit 8855595b80

View File

@@ -132,7 +132,7 @@ class DialogBuilder(val context: Context) {
/** 显示对话框 */
@CauseProblemsApi
fun show() {
fun show() = runInSafe {
instance?.create()?.apply {
customLayoutView?.let { setView(it) }
dialogInstance = this