refactor(patch-options): remove OverlayButtonsIcon
options
@ -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
|
* Theme
|
||||||
*/
|
*/
|
||||||
|
@ -10,7 +10,6 @@ import app.revanced.patcher.patch.ResourcePatch
|
|||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.annotation.YouTubeCompatibility
|
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.autorepeat.patch.AutoRepeatPatch
|
||||||
import app.revanced.patches.youtube.button.overlaybuttons.bytecode.patch.OverlayButtonsBytecodePatch
|
import app.revanced.patches.youtube.button.overlaybuttons.bytecode.patch.OverlayButtonsBytecodePatch
|
||||||
import app.revanced.patches.youtube.button.whitelist.patch.WhitelistPatch
|
import app.revanced.patches.youtube.button.whitelist.patch.WhitelistPatch
|
||||||
@ -28,7 +27,6 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
|||||||
AutoRepeatPatch::class,
|
AutoRepeatPatch::class,
|
||||||
OverlayButtonsBytecodePatch::class,
|
OverlayButtonsBytecodePatch::class,
|
||||||
OverrideSpeedHookPatch::class,
|
OverrideSpeedHookPatch::class,
|
||||||
PatchOptions::class,
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
WhitelistPatch::class
|
WhitelistPatch::class
|
||||||
]
|
]
|
||||||
@ -38,16 +36,14 @@ import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
|||||||
class OverlayButtonsPatch : ResourcePatch {
|
class OverlayButtonsPatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
|
||||||
val icon = PatchOptions.OverlayButtonsIcon!!
|
/**
|
||||||
|
|
||||||
/*
|
|
||||||
* Copy arrays
|
* Copy arrays
|
||||||
*/
|
*/
|
||||||
|
|
||||||
context.copyXmlNode("youtube/overlaybuttons/host", "values/arrays.xml", "resources")
|
context.copyXmlNode("youtube/overlaybuttons/host", "values/arrays.xml", "resources")
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Copy resources
|
* Copy resources
|
||||||
*/
|
*/
|
||||||
arrayOf(
|
arrayOf(
|
||||||
@ -56,12 +52,7 @@ class OverlayButtonsPatch : ResourcePatch {
|
|||||||
"playlist_repeat_button.xml",
|
"playlist_repeat_button.xml",
|
||||||
"playlist_shuffle_button.xml",
|
"playlist_shuffle_button.xml",
|
||||||
"revanced_repeat_icon.xml"
|
"revanced_repeat_icon.xml"
|
||||||
)
|
),
|
||||||
).forEach { resourceGroup ->
|
|
||||||
context.copyResources("youtube/overlaybuttons", resourceGroup)
|
|
||||||
}
|
|
||||||
|
|
||||||
arrayOf(
|
|
||||||
ResourceUtils.ResourceGroup(
|
ResourceUtils.ResourceGroup(
|
||||||
"drawable-xxhdpi",
|
"drawable-xxhdpi",
|
||||||
"ic_fullscreen_vertical_button.png",
|
"ic_fullscreen_vertical_button.png",
|
||||||
@ -81,10 +72,10 @@ class OverlayButtonsPatch : ResourcePatch {
|
|||||||
"yt_outline_screen_full_white_24.png"
|
"yt_outline_screen_full_white_24.png"
|
||||||
)
|
)
|
||||||
).forEach { resourceGroup ->
|
).forEach { resourceGroup ->
|
||||||
context.copyResources("youtube/overlaybuttons/$icon", resourceGroup)
|
context.copyResources("youtube/overlaybuttons", resourceGroup)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Copy preference fragments
|
* Copy preference fragments
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -111,7 +102,7 @@ class OverlayButtonsPatch : ResourcePatch {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Add settings
|
* Add settings
|
||||||
*/
|
*/
|
||||||
SettingsPatch.addPreference(
|
SettingsPatch.addPreference(
|
||||||
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.2 KiB |