mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-02-23 15:51:11 +01:00
chore: merge nested if blocks
This commit is contained in:
parent
7dabd53109
commit
00145f2bb6
@ -24,13 +24,11 @@ fun Patcher.addPatchesFiltered(
|
|||||||
|
|
||||||
val prefix = "[skipped] $patchName"
|
val prefix = "[skipped] $patchName"
|
||||||
|
|
||||||
val args = MainCommand.args.pArgs!!
|
val args = MainCommand.args.pArgs!!
|
||||||
|
|
||||||
if (excludePatches) {
|
if (excludePatches && args.excludedPatches.contains(patchName)) {
|
||||||
if (args.excludedPatches.contains(patchName)) {
|
println("$prefix: Explicitly excluded.")
|
||||||
println("$prefix: Explicitly excluded.")
|
return@patch
|
||||||
return@patch
|
|
||||||
}
|
|
||||||
} else if (!patch.include) {
|
} else if (!patch.include) {
|
||||||
println("$prefix: Implicitly excluded.")
|
println("$prefix: Implicitly excluded.")
|
||||||
return@patch
|
return@patch
|
||||||
@ -43,7 +41,7 @@ fun Patcher.addPatchesFiltered(
|
|||||||
return@patch
|
return@patch
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(args.experimental || compatiblePackages.any { it.versions.isEmpty() || it.versions.any { version -> version == packageVersion }})) {
|
if (!(args.experimental || compatiblePackages.any { it.versions.isEmpty() || it.versions.any { version -> version == packageVersion } })) {
|
||||||
println("$prefix: The package version is $packageVersion and is incompatible.")
|
println("$prefix: The package version is $packageVersion and is incompatible.")
|
||||||
return@patch
|
return@patch
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user