mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: patches not being reloaded
This commit is contained in:
parent
f6563b265b
commit
9586a9c0dd
@ -12,14 +12,15 @@ import java.io.File
|
|||||||
class PatchBundle(private val loader: Iterable<PatchClass>, val integrations: File?) {
|
class PatchBundle(private val loader: Iterable<PatchClass>, val integrations: File?) {
|
||||||
constructor(bundleJar: File, integrations: File?) : this(
|
constructor(bundleJar: File, integrations: File?) : this(
|
||||||
object : Iterable<PatchClass> {
|
object : Iterable<PatchClass> {
|
||||||
private val bundle = bundleJar.absolutePath.let {
|
private fun load(): List<PatchClass> {
|
||||||
PatchBundle.Dex(
|
val path = bundleJar.absolutePath
|
||||||
it,
|
return PatchBundle.Dex(
|
||||||
PathClassLoader(it, Patcher::class.java.classLoader)
|
path,
|
||||||
)
|
PathClassLoader(path, Patcher::class.java.classLoader)
|
||||||
|
).loadPatches()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun iterator() = bundle.loadPatches().iterator()
|
override fun iterator() = load().iterator()
|
||||||
},
|
},
|
||||||
integrations
|
integrations
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user