refactor: update KavaRef usage to 1.0.1

This commit is contained in:
2025-07-06 21:37:37 +08:00
parent 29b14a811e
commit a7582de004
2 changed files with 5 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ import com.fankes.coloros.notify.utils.tool.ActivationPromptTool
import com.fankes.coloros.notify.utils.tool.BitmapCompatTool
import com.fankes.coloros.notify.utils.tool.IconAdaptationTool
import com.fankes.coloros.notify.utils.tool.SystemUITool
import com.highcapable.kavaref.KavaRef.Companion.asResolver
import com.highcapable.kavaref.KavaRef.Companion.resolve
import com.highcapable.kavaref.condition.type.VagueType
import com.highcapable.kavaref.extension.VariousClass
@@ -363,7 +364,7 @@ object SystemUIHooker : YukiBaseHooker() {
/** 刷新通知小图标 */
private fun refreshNotificationIcons() = runInSafe {
notificationPresenter?.resolve()?.optional()?.firstMethodOrNull {
notificationPresenter?.asResolver()?.optional()?.firstMethodOrNull {
name = "updateNotificationsOnDensityOrFontScaleChanged"
emptyParameters()
}?.invoke()
@@ -886,7 +887,7 @@ object SystemUIHooker : YukiBaseHooker() {
?.of(NotificationViewWrapperClass.resolve().optional().firstFieldOrNull {
name = "mRow"
}?.of(instance)?.get())?.invokeQuietly()?.let {
it.resolve().optional().firstMethodOrNull {
it.asResolver().optional().firstMethodOrNull {
name = "getSbn"
}?.invoke<StatusBarNotification>()
}.also { nf ->

View File

@@ -48,9 +48,9 @@ libraries:
version-ref: <this>::api
com.highcapable.kavaref:
kavaref-core:
version: 1.0.0
version: 1.0.1
kavaref-extension:
version: 1.0.0
version: 1.0.1
com.github.topjohnwu.libsu:
core:
version: 5.2.2