mirror of
https://github.com/ReVanced/revanced-library.git
synced 2026-01-18 00:43:56 +00:00
fix: Sort the version maps by the most common version
This commit is contained in:
@@ -75,5 +75,13 @@ object PatchUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort the version maps by the most common version.
|
||||||
|
forEach { (packageName, versionMap) ->
|
||||||
|
this[packageName] = versionMap
|
||||||
|
.asIterable()
|
||||||
|
.sortedWith(compareByDescending { it.value })
|
||||||
|
.associate { it.key to it.value } as VersionMap
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user