mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
fix(YouTube - Custom branding icon): Restrict the version that can use the patch options Change splash icons
to YouTube 19.16.39 (Close https://github.com/inotia00/ReVanced_Extended/issues/2605)
This commit is contained in:
@ -5,12 +5,14 @@ import app.revanced.patcher.patch.resourcePatch
|
||||
import app.revanced.patcher.patch.stringOption
|
||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||
import app.revanced.patches.youtube.utils.patch.PatchList.CUSTOM_BRANDING_ICON_FOR_YOUTUBE
|
||||
import app.revanced.patches.youtube.utils.playservice.is_19_17_or_greater
|
||||
import app.revanced.patches.youtube.utils.playservice.is_19_32_or_greater
|
||||
import app.revanced.patches.youtube.utils.playservice.is_19_34_or_greater
|
||||
import app.revanced.patches.youtube.utils.playservice.versionCheckPatch
|
||||
import app.revanced.patches.youtube.utils.settings.ResourceUtils.updatePatchStatusIcon
|
||||
import app.revanced.patches.youtube.utils.settings.settingsPatch
|
||||
import app.revanced.util.ResourceGroup
|
||||
import app.revanced.util.Utils.printWarn
|
||||
import app.revanced.util.Utils.trimIndentMultiline
|
||||
import app.revanced.util.copyAdaptiveIcon
|
||||
import app.revanced.util.copyFile
|
||||
@ -122,7 +124,7 @@ val customBrandingIconPatch = resourcePatch(
|
||||
key = "changeSplashIcon",
|
||||
default = true,
|
||||
title = "Change splash icons",
|
||||
description = "Apply the custom branding icon to the splash screen.",
|
||||
description = "Apply the custom branding icon to the splash screen. Supports from YouTube 18.29.38 to YouTube 19.16.39.",
|
||||
required = true
|
||||
)
|
||||
|
||||
@ -171,6 +173,7 @@ val customBrandingIconPatch = resourcePatch(
|
||||
|
||||
// Change splash icon.
|
||||
if (changeSplashIconOption == true) {
|
||||
if (!is_19_17_or_greater) {
|
||||
splashIconResourceGroups.let { resourceGroups ->
|
||||
resourceGroups.forEach {
|
||||
copyResources("$appIconResourcePath/splash", it)
|
||||
@ -195,6 +198,9 @@ val customBrandingIconPatch = resourcePatch(
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printWarn("\"Change splash icons\" is not supported in this version. Use YouTube 19.16.39 or earlier.")
|
||||
}
|
||||
}
|
||||
|
||||
// Change splash screen.
|
||||
|
Reference in New Issue
Block a user