From 03d3e0ca28f2568290bedfdc8149e14a2689487f Mon Sep 17 00:00:00 2001 From: inotia00 Date: Sun, 16 Apr 2023 01:43:23 +0900 Subject: [PATCH] refactor(hide-double-tap-overlay-filter): also hide the 'white circle overlay' https://github.com/inotia00/ReVanced_Extended/issues/745 --- .../patch/DoubleTapOverlayBackgroundPatch.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/etc/doubletapbackground/patch/DoubleTapOverlayBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/etc/doubletapbackground/patch/DoubleTapOverlayBackgroundPatch.kt index d16a4a5f6..75a18cf7d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/etc/doubletapbackground/patch/DoubleTapOverlayBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/etc/doubletapbackground/patch/DoubleTapOverlayBackgroundPatch.kt @@ -22,8 +22,17 @@ class DoubleTapOverlayBackgroundPatch : ResourcePatch { override fun execute(context: ResourceContext): PatchResult { context.xmlEditor[RESOURCE_FILE_PATH].use { it.file.getElementsByTagName("merge").item(0).childNodes.apply { + val attributes = arrayOf("height", "width") for (i in 1 until length) { val view = item(i) + if ( + view.hasAttributes() && + view.attributes.getNamedItem("android:id").nodeValue.endsWith("tap_bloom_view") + ) { + attributes.forEach { attribute -> + view.attributes.getNamedItem("android:layout_$attribute").nodeValue = "0.0dip" + } + } if ( view.hasAttributes() && view.attributes.getNamedItem("android:id").nodeValue.endsWith("dark_background")