Skip to content

Commit

Permalink
fix: callback for each file instead of class
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jun 22, 2022
1 parent 1f4bc50 commit 930768d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/app/revanced/patcher/Patcher.kt
Expand Up @@ -128,6 +128,8 @@ class Patcher(private val options: PatcherOptions) {
callback: (File) -> Unit
) {
for (file in files) {
callback(file)

for (classDef in MultiDexIO.readDexFile(true, file, NAMER, null, null).classes) {
val type = classDef.type

Expand All @@ -138,7 +140,6 @@ class Patcher(private val options: PatcherOptions) {
logger.trace("Merging $type")
data.bytecodeData.classes.internalClasses.add(classDef)

callback(file)

continue
}
Expand All @@ -150,7 +151,6 @@ class Patcher(private val options: PatcherOptions) {
val index = existingClass.second
data.bytecodeData.classes.internalClasses[index] = classDef

callback(file)
}
}
}
Expand Down

0 comments on commit 930768d

Please sign in to comment.