mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-04 14:34:25 +02:00
fix: callback for each file instead of class
This commit is contained in:
parent
1f4bc5079f
commit
930768dfb3
@ -128,6 +128,8 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
callback: (File) -> Unit
|
callback: (File) -> Unit
|
||||||
) {
|
) {
|
||||||
for (file in files) {
|
for (file in files) {
|
||||||
|
callback(file)
|
||||||
|
|
||||||
for (classDef in MultiDexIO.readDexFile(true, file, NAMER, null, null).classes) {
|
for (classDef in MultiDexIO.readDexFile(true, file, NAMER, null, null).classes) {
|
||||||
val type = classDef.type
|
val type = classDef.type
|
||||||
|
|
||||||
@ -138,7 +140,6 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
logger.trace("Merging $type")
|
logger.trace("Merging $type")
|
||||||
data.bytecodeData.classes.internalClasses.add(classDef)
|
data.bytecodeData.classes.internalClasses.add(classDef)
|
||||||
|
|
||||||
callback(file)
|
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -150,7 +151,6 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
val index = existingClass.second
|
val index = existingClass.second
|
||||||
data.bytecodeData.classes.internalClasses[index] = classDef
|
data.bytecodeData.classes.internalClasses[index] = classDef
|
||||||
|
|
||||||
callback(file)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user