refactor(patch-options): remove OverlayButtonsIcon options

This commit is contained in:
inotia00 2023-04-30 18:06:08 +09:00
parent 1b5e850976
commit bb331e5c3a
32 changed files with 6 additions and 27 deletions

View File

@ -72,18 +72,6 @@ class PatchOptions : ResourcePatch {
)
)
/**
* Overlay Buttons Icon
*/
internal var OverlayButtonsIcon: String? by option(
PatchOption.StringOption(
key = "OverlayButtonsIcon",
default = "new",
title = "Overlay button icon selection",
description = "Choose an overlay buttons icon: old/new"
)
)
/**
* Theme
*/

View File

@ -10,7 +10,6 @@ import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.patch.options.PatchOptions
import app.revanced.patches.youtube.button.autorepeat.patch.AutoRepeatPatch
import app.revanced.patches.youtube.button.overlaybuttons.bytecode.patch.OverlayButtonsBytecodePatch
import app.revanced.patches.youtube.button.whitelist.patch.WhitelistPatch
@ -28,7 +27,6 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
AutoRepeatPatch::class,
OverlayButtonsBytecodePatch::class,
OverrideSpeedHookPatch::class,
PatchOptions::class,
SettingsPatch::class,
WhitelistPatch::class
]
@ -38,16 +36,14 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
class OverlayButtonsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
val icon = PatchOptions.OverlayButtonsIcon!!
/*
/**
* Copy arrays
*/
context.copyXmlNode("youtube/overlaybuttons/host", "values/arrays.xml", "resources")
/*
/**
* Copy resources
*/
arrayOf(
@ -56,12 +52,7 @@ class OverlayButtonsPatch : ResourcePatch {
"playlist_repeat_button.xml",
"playlist_shuffle_button.xml",
"revanced_repeat_icon.xml"
)
).forEach { resourceGroup ->
context.copyResources("youtube/overlaybuttons", resourceGroup)
}
arrayOf(
),
ResourceUtils.ResourceGroup(
"drawable-xxhdpi",
"ic_fullscreen_vertical_button.png",
@ -81,10 +72,10 @@ class OverlayButtonsPatch : ResourcePatch {
"yt_outline_screen_full_white_24.png"
)
).forEach { resourceGroup ->
context.copyResources("youtube/overlaybuttons/$icon", resourceGroup)
context.copyResources("youtube/overlaybuttons", resourceGroup)
}
/*
/**
* Copy preference fragments
*/
@ -111,7 +102,7 @@ class OverlayButtonsPatch : ResourcePatch {
)
)
/*
/**
* Add settings
*/
SettingsPatch.addPreference(

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB