mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-28 17:05:49 +01:00
fix: missing extension method doRecursively
This commit is contained in:
parent
8a0ee03a71
commit
e9c946008e
@ -2,6 +2,7 @@ package app.revanced.extensions
|
|||||||
|
|
||||||
import app.revanced.patcher.util.smali.toInstruction
|
import app.revanced.patcher.util.smali.toInstruction
|
||||||
import org.jf.dexlib2.builder.MutableMethodImplementation
|
import org.jf.dexlib2.builder.MutableMethodImplementation
|
||||||
|
import org.w3c.dom.Node
|
||||||
|
|
||||||
internal fun MutableMethodImplementation.injectHideCall(
|
internal fun MutableMethodImplementation.injectHideCall(
|
||||||
index: Int,
|
index: Int,
|
||||||
@ -13,6 +14,11 @@ internal fun MutableMethodImplementation.injectHideCall(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal fun Node.doRecursively(action: (Node) -> Unit) {
|
||||||
|
action(this)
|
||||||
|
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
||||||
|
}
|
||||||
|
|
||||||
internal fun String.startsWithAny(vararg prefix: String): Boolean {
|
internal fun String.startsWithAny(vararg prefix: String): Boolean {
|
||||||
for (_prefix in prefix)
|
for (_prefix in prefix)
|
||||||
if (this.startsWith(_prefix))
|
if (this.startsWith(_prefix))
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package app.revanced.patches.youtube.misc.mapping.patch
|
package app.revanced.patches.youtube.misc.mapping.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.doRecursively
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
@ -7,7 +8,6 @@ import app.revanced.patcher.data.implementation.ResourceData
|
|||||||
import app.revanced.patcher.patch.implementation.ResourcePatch
|
import app.revanced.patcher.patch.implementation.ResourcePatch
|
||||||
import app.revanced.patcher.patch.implementation.misc.PatchResult
|
import app.revanced.patcher.patch.implementation.misc.PatchResult
|
||||||
import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess
|
import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess
|
||||||
import app.revanced.patches.youtube.ad.general.resource.util.Extensions.doRecursively
|
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
@Name("resource-id-mapping-provider-resource-patch-dependency")
|
@Name("resource-id-mapping-provider-resource-patch-dependency")
|
||||||
|
Loading…
Reference in New Issue
Block a user