mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-09-20 04:53:45 +02:00
fix(predictive-back-gesture): create attribute, if it does not exist
This commit is contained in:
parent
c76cd0d5a6
commit
c00e771705
1 changed files with 6 additions and 5 deletions
|
@ -19,11 +19,12 @@ class PredictiveBackGesturePatch : ResourcePatch {
|
|||
val document = editor.file
|
||||
|
||||
with(document.getElementsByTagName("application").item(0)) {
|
||||
attributes.getNamedItem(FLAG)?.let {
|
||||
document.createAttribute(FLAG)
|
||||
.apply { value = "true" }
|
||||
.let(attributes::setNamedItem)
|
||||
}
|
||||
if (attributes.getNamedItem(FLAG) != null) return@with
|
||||
|
||||
document.createAttribute(FLAG)
|
||||
.apply { value = "true" }
|
||||
.let(attributes::setNamedItem)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue