We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8767f0e commit dccf861Copy full SHA for dccf861
1 file changed
app/src/main/java/app/revanced/manager/patcher/patch/PatchBundle.kt
@@ -12,14 +12,15 @@ import java.io.File
12
class PatchBundle(private val loader: Iterable<PatchClass>, val integrations: File?) {
13
constructor(bundleJar: File, integrations: File?) : this(
14
object : Iterable<PatchClass> {
15
- private val bundle = bundleJar.absolutePath.let {
16
- PatchBundle.Dex(
17
- it,
18
- PathClassLoader(it, Patcher::class.java.classLoader)
19
- )
+ private fun load(): List<PatchClass> {
+ val path = bundleJar.absolutePath
+ return PatchBundle.Dex(
+ path,
+ PathClassLoader(path, Patcher::class.java.classLoader)
20
+ ).loadPatches()
21
}
22
- override fun iterator() = bundle.loadPatches().iterator()
23
+ override fun iterator() = load().iterator()
24
},
25
integrations
26
) {
0 commit comments