mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-02 07:34:31 +02:00
improve AbstractSettingsResourcePatch
This commit is contained in:
parent
490efb6476
commit
17a18b59b2
@ -21,6 +21,13 @@ abstract class AbstractSettingsResourcePatch(
|
|||||||
private val isYouTube: Boolean,
|
private val isYouTube: Boolean,
|
||||||
) : ResourcePatch {
|
) : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
/*
|
||||||
|
* Copy strings
|
||||||
|
*/
|
||||||
|
context.copyXmlNode(sourcehostDirectory, "values/strings.xml", "resources")
|
||||||
|
|
||||||
|
/* initialize ReVanced Settings */
|
||||||
|
if (isYouTube) {
|
||||||
/*
|
/*
|
||||||
* used for self-restart
|
* used for self-restart
|
||||||
*/
|
*/
|
||||||
@ -32,13 +39,6 @@ abstract class AbstractSettingsResourcePatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Copy strings
|
|
||||||
*/
|
|
||||||
context.copyXmlNode(sourcehostDirectory, "values/strings.xml", "resources")
|
|
||||||
|
|
||||||
/* initialize ReVanced Settings */
|
|
||||||
if (isYouTube == true) {
|
|
||||||
context.copyResources(sourceDirectory, ResourceUtils.ResourceGroup("xml", "revanced_prefs.xml"))
|
context.copyResources(sourceDirectory, ResourceUtils.ResourceGroup("xml", "revanced_prefs.xml"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user