mirror of
https://github.com/revanced/revanced-patches
synced 2024-08-28 18:15:17 +02: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
|
||||
|
||||
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 New Issue
Block a user