mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(YouTube/Settings): move SponsorBlock settings and Return YouTube Dislike settings to RVX Settings
This commit is contained in:
@ -106,9 +106,13 @@ object ReturnYouTubeDislikePatch : BaseBytecodePatch(
|
||||
// endregion
|
||||
|
||||
/**
|
||||
* Add ReVanced Extended Settings
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreferenceFragment("revanced_ryd_settings")
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"PREFERENCE: RETURN_YOUTUBE_DISLIKE_SETTINGS"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("Return YouTube Dislike")
|
||||
|
||||
|
@ -20,7 +20,7 @@ import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.jar.Manifest
|
||||
|
||||
@Suppress("DEPRECATION", "SpellCheckingInspection", "unused")
|
||||
@Suppress("DEPRECATION", "unused")
|
||||
object SettingsPatch : BaseResourcePatch(
|
||||
name = "Settings",
|
||||
description = "Applies mandatory patches to implement ReVanced Extended settings into the application.",
|
||||
@ -105,6 +105,7 @@ object SettingsPatch : BaseResourcePatch(
|
||||
arrayOf(
|
||||
ResourceGroup(
|
||||
"layout",
|
||||
"revanced_settings_preferences_category.xml",
|
||||
"revanced_settings_with_toolbar.xml"
|
||||
),
|
||||
ResourceGroup(
|
||||
@ -118,7 +119,7 @@ object SettingsPatch : BaseResourcePatch(
|
||||
/**
|
||||
* initialize ReVanced Extended Settings
|
||||
*/
|
||||
addPreferenceFragment("revanced_extended_settings")
|
||||
context.addPreferenceFragment("revanced_extended_settings")
|
||||
|
||||
/**
|
||||
* remove ReVanced Extended Settings divider
|
||||
@ -150,10 +151,6 @@ object SettingsPatch : BaseResourcePatch(
|
||||
contexts.addPreference(settingArray)
|
||||
}
|
||||
|
||||
internal fun addPreferenceFragment(key: String) {
|
||||
contexts.addPreferenceFragment(key)
|
||||
}
|
||||
|
||||
internal fun updatePatchStatus(patchTitle: String) {
|
||||
contexts.updatePatchStatus(patchTitle)
|
||||
}
|
||||
|
@ -137,9 +137,13 @@ object SponsorBlockPatch : BaseResourcePatch(
|
||||
if (!modifiedControlsLayout) throw PatchException("Could not modify controls layout")
|
||||
|
||||
/**
|
||||
* Add ReVanced Extended Settings
|
||||
* Add settings
|
||||
*/
|
||||
SettingsPatch.addPreferenceFragment("revanced_sb_settings")
|
||||
SettingsPatch.addPreference(
|
||||
arrayOf(
|
||||
"PREFERENCE: SPONSOR_BLOCK_SETTINGS"
|
||||
)
|
||||
)
|
||||
|
||||
SettingsPatch.updatePatchStatus("SponsorBlock")
|
||||
|
||||
|
Reference in New Issue
Block a user