Merge code

This commit is contained in:
2022-03-22 23:43:46 +08:00
parent 3ecbe6159b
commit 1795addbf3
4 changed files with 27 additions and 6 deletions

2
.idea/misc.xml generated
View File

@@ -6,6 +6,8 @@
<entry key="app/src/main/res/drawable-night/bg_orange_round.xml" value="0.232" />
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.254" />
<entry key="app/src/main/res/drawable/bg_orange_round.xml" value="0.232" />
<entry key="app/src/main/res/drawable/ic_nf_icon_refresh.xml" value="0.232" />
<entry key="app/src/main/res/drawable/ic_nf_icon_update.xml" value="0.232" />
<entry key="app/src/main/res/layout/activity_config.xml" value="0.4375" />
<entry key="app/src/main/res/layout/activity_main.xml" value="0.335" />
<entry key="app/src/main/res/layout/adapter_config.xml" value="0.4375" />

View File

@@ -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<NotificationManager>()?.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(

View File

@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:tint="@color/white"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M9.01,14H2v2h7.01v3L13,15l-3.99,-4V14zM14.99,13v-3H22V8h-7.01V5L11,9L14.99,13z" />
</vector>

View File

@@ -1,5 +1,11 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM14,13v4h-4v-4H7l5,-5 5,5h-3z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="@color/white"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM14,13v4h-4v-4H7l5,-5 5,5h-3z" />
</vector>