mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-01 05:44:24 +02:00
fix: only emit closed patches that did not throw an exception with the @Patch
annotation
This commit is contained in:
parent
5c0c0d6c37
commit
5938f6b7ea
@ -2,6 +2,7 @@ package app.revanced.patcher
|
||||
|
||||
import app.revanced.patcher.data.Context
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.extensions.AnnotationExtensions.findAnnotationRecursively
|
||||
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.extensions.PatchExtensions.requiresIntegrations
|
||||
@ -202,7 +203,15 @@ class Patcher(
|
||||
)
|
||||
|
||||
if (returnOnError) return@flow
|
||||
} ?: emit(result)
|
||||
} ?: run {
|
||||
executedPatch
|
||||
.patchInstance::class
|
||||
.java
|
||||
.findAnnotationRecursively(app.revanced.patcher.patch.annotations.Patch::class)
|
||||
?: return@run
|
||||
|
||||
emit(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user