From 3abe4d7800cc266cd05bc5802c882dc9eaf714f1 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Mon, 6 Feb 2023 01:59:15 +0800 Subject: [PATCH] Fix the custom url sync result callback maybe not canceled the dialog problem in IconRuleManagerTool --- .../com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt b/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt index 8a97521..1b1a70c 100644 --- a/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt +++ b/app/src/main/java/com/fankes/miui/notify/utils/tool/IconRuleManagerTool.kt @@ -246,6 +246,8 @@ object IconRuleManagerTool { fun doParse(result: () -> Unit = {}) { wait(context, url) { isDone, content -> result() + /** 延迟重新回调防止对话框无法取消 */ + delayedRun { result() } IconPackParams(context).also { params -> when { isDone -> when {