mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-10 09:29:22 +01:00
fix(predictive-back-gesture): create attribute, if it does not exist
This commit is contained in:
parent
c76cd0d5a6
commit
c00e771705
@ -19,11 +19,12 @@ class PredictiveBackGesturePatch : ResourcePatch {
|
|||||||
val document = editor.file
|
val document = editor.file
|
||||||
|
|
||||||
with(document.getElementsByTagName("application").item(0)) {
|
with(document.getElementsByTagName("application").item(0)) {
|
||||||
attributes.getNamedItem(FLAG)?.let {
|
if (attributes.getNamedItem(FLAG) != null) return@with
|
||||||
document.createAttribute(FLAG)
|
|
||||||
.apply { value = "true" }
|
document.createAttribute(FLAG)
|
||||||
.let(attributes::setNamedItem)
|
.apply { value = "true" }
|
||||||
}
|
.let(attributes::setNamedItem)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user