@@ -334,8 +334,7 @@ class ActionListFragment : androidx.fragment.app.Fragment(), PageLayoutRender.On
334334 return krScriptActionHandler?.openFileChooser(callback) ? : false
335335 }
336336 })
337- // Không hideDialog() ở đây nữa — sẽ tắt sau khi dialog tham số
338- // mới (đã có nền mờ) hiện lên, xem bên dưới.
337+ progressBarDialog.hideDialog()
339338
340339 val customRunner = krScriptActionHandler?.openParamsPage(action, linearLayout) {
341340 try {
@@ -356,19 +355,13 @@ class ActionListFragment : androidx.fragment.app.Fragment(), PageLayoutRender.On
356355 val dialog = if (isLongList) {
357356 AlertDialog .Builder (requireContext(), if (darkMode) R .style.kr_full_screen_dialog_dark else R .style.kr_full_screen_dialog_light)
358357 .setView(dialogView).create().apply {
359- // Set nền blur TRƯỚC show() để tránh nháy (frame đầu không mờ)
360- window?.let { DialogHelper .setWindowBlurBg(it, requireActivity()) }
361358 show()
359+ window?.let { DialogHelper .setWindowBlurBg(it, requireActivity()) }
362360 }
363361 } else {
364362 DialogHelper .customDialog(requireActivity(), dialogView).dialog
365363 }
366364
367- // Chỉ tắt dialog "loading" SAU KHI dialog tham số (đã có nền mờ) hiện lên,
368- // để lúc nào màn hình cũng có một dialog mờ che phủ, không có khoảng
369- // trống bị "tắt mờ" giữa 2 dialog.
370- progressBarDialog.hideDialog()
371-
372365 dialogView.findViewById<TextView >(R .id.title).text = action.title
373366 dialogView.findViewById<TextView >(R .id.desc).apply { if (action.desc.isEmpty()) visibility = View .GONE else text = action.desc }
374367 dialogView.findViewById<TextView >(R .id.warn).apply { if (action.warning.isEmpty()) visibility = View .GONE else text = action.warning }
@@ -382,9 +375,6 @@ class ActionListFragment : androidx.fragment.app.Fragment(), PageLayoutRender.On
382375 Toast .makeText(requireContext(), " " + ex.message, Toast .LENGTH_LONG ).show()
383376 }
384377 }
385- } else {
386- // openParamsPage tự xử lý UI riêng (không phải dialog blur ở trên) -> tắt loading ngay
387- progressBarDialog.hideDialog()
388378 }
389379 }
390380 }
0 commit comments