feat: Use an extension property to create new exception when failing to resolve a fingerprint
This commit adds the extension property to the public API
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.songpal.badge.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@@ -50,7 +50,7 @@ class BadgeTabPatch : BytecodePatch(
|
||||
"""
|
||||
)
|
||||
|
||||
} ?: throw CreateTabsFingerprint.toErrorResult()
|
||||
} ?: throw CreateTabsFingerprint.exception
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.songpal.badge.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
@@ -20,6 +20,6 @@ class RemoveNotificationBadgePatch : BytecodePatch(
|
||||
override fun execute(context: BytecodeContext) {
|
||||
ShowNotificationFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructions(0, "return-void")
|
||||
} ?: throw ShowNotificationFingerprint.toErrorResult()
|
||||
} ?: throw ShowNotificationFingerprint.exception
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user