mirror of
https://github.com/fankes/ColorOSNotifyIcon.git
synced 2025-09-06 18:55:37 +08:00
Fix notification panel icon reset by system problem in SystemUIHooker
This commit is contained in:
@@ -852,6 +852,8 @@ object SystemUIHooker : YukiBaseHooker() {
|
|||||||
}.also { nf ->
|
}.also { nf ->
|
||||||
nf?.notification?.also {
|
nf?.notification?.also {
|
||||||
it.smallIcon.loadDrawable(context)?.also { iconDrawable ->
|
it.smallIcon.loadDrawable(context)?.also { iconDrawable ->
|
||||||
|
/** 执行替换 */
|
||||||
|
fun doParse() {
|
||||||
compatNotifyIcon(
|
compatNotifyIcon(
|
||||||
context = context,
|
context = context,
|
||||||
nf = nf,
|
nf = nf,
|
||||||
@@ -862,6 +864,10 @@ object SystemUIHooker : YukiBaseHooker() {
|
|||||||
iconView = this
|
iconView = this
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
doParse()
|
||||||
|
/** 延迟重新设置防止部分机型的系统重新设置图标出现图标着色后黑白块问题 */
|
||||||
|
delayedRun(ms = 1500) { doParse() }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user