From 1795addbf33745a720177b6375a328265da01a6b Mon Sep 17 00:00:00 2001 From: Fankesyooni Date: Tue, 22 Mar 2022 23:43:46 +0800 Subject: [PATCH] Merge code --- .idea/misc.xml | 2 ++ .../notify/utils/tool/IconRuleManagerTool.kt | 5 +++-- app/src/main/res/drawable/ic_nf_icon_refresh.xml | 12 ++++++++++++ app/src/main/res/drawable/ic_nf_icon_update.xml | 14 ++++++++++---- 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/drawable/ic_nf_icon_refresh.xml diff --git a/.idea/misc.xml b/.idea/misc.xml index 34bb8a4..515e7e8 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -6,6 +6,8 @@ + + diff --git a/app/src/main/java/com/fankes/coloros/notify/utils/tool/IconRuleManagerTool.kt b/app/src/main/java/com/fankes/coloros/notify/utils/tool/IconRuleManagerTool.kt index 7133a24..1d1e147 100644 --- a/app/src/main/java/com/fankes/coloros/notify/utils/tool/IconRuleManagerTool.kt +++ b/app/src/main/java/com/fankes/coloros/notify/utils/tool/IconRuleManagerTool.kt @@ -367,7 +367,8 @@ object IconRuleManagerTool { private fun pushWithRefresh(context: Context) { if (context !is AppCompatActivity) return SystemUITool.showNeedUpdateApplySnake(context) - pushNotify(appContext, title = "更新完成", msg = "部分通知图标需要重启系统界面生效", isAction = false) + /** 发送通知提醒宿主更新图标缓存 */ + pushNotify(appContext, title = "请稍后", msg = "正在动态刷新通知图标改变", isAction = false) /** 刷新成功后取消通知 */ Handler().postDelayed({ context.getSystemService()?.cancel(1) }, 1500) } @@ -404,7 +405,7 @@ object IconRuleManagerTool { setContentText(msg) color = OS_COLOR.toInt() setAutoCancel(true) - setSmallIcon(R.drawable.ic_nf_icon_update) + setSmallIcon(if (isAction) R.drawable.ic_nf_icon_update else R.drawable.ic_nf_icon_refresh) setSound(null) setDefaults(NotificationCompat.DEFAULT_ALL) if (isAction) setContentIntent( diff --git a/app/src/main/res/drawable/ic_nf_icon_refresh.xml b/app/src/main/res/drawable/ic_nf_icon_refresh.xml new file mode 100644 index 0000000..a75eeda --- /dev/null +++ b/app/src/main/res/drawable/ic_nf_icon_refresh.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_nf_icon_update.xml b/app/src/main/res/drawable/ic_nf_icon_update.xml index 684336c..3691ec4 100644 --- a/app/src/main/res/drawable/ic_nf_icon_update.xml +++ b/app/src/main/res/drawable/ic_nf_icon_update.xml @@ -1,5 +1,11 @@ - - + + +