mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-25 12:11:03 +00:00
feat: PatchOptions#nullify to nullify an option
This commit is contained in:
@@ -42,6 +42,14 @@ class PatchOptions(vararg val options: PatchOption<*>) : Iterable<PatchOption<*>
|
||||
opt.value = value
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of a [PatchOption] to `null`.
|
||||
* @param key The key of the [PatchOption].
|
||||
*/
|
||||
fun nullify(key: String) {
|
||||
get(key).value = null
|
||||
}
|
||||
|
||||
override fun iterator() = options.iterator()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user