mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-19 23:19:27 +01:00
fix: multiple compatible pkgs on readme
This commit is contained in:
parent
835a3b82c2
commit
88c1450fa4
@ -17,13 +17,11 @@ fun generateText(bundle: Bundle) {
|
|||||||
val output = StringBuilder()
|
val output = StringBuilder()
|
||||||
val packages = mutableMapOf<String, MutableList<Class<out Patch<Data>>>>()
|
val packages = mutableMapOf<String, MutableList<Class<out Patch<Data>>>>()
|
||||||
|
|
||||||
bundle.map {
|
for (patch in bundle) {
|
||||||
val packageName = it.compatiblePackages?.first()?.name!!
|
patch.compatiblePackages?.forEach { pkg ->
|
||||||
if (!packages.contains(packageName)) {
|
if (!packages.contains(pkg.name)) packages[pkg.name] = mutableListOf()
|
||||||
packages[packageName] = mutableListOf()
|
packages[pkg.name]!!.add(patch)
|
||||||
}
|
}
|
||||||
|
|
||||||
packages[packageName]?.add(it)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pkg in packages) {
|
for (pkg in packages) {
|
||||||
|
Loading…
Reference in New Issue
Block a user