mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(YouTube/Player components): add setting toggle for Hide suggested video end screen
https://github.com/inotia00/ReVanced_Extended/issues/2066
This commit is contained in:
@ -4,7 +4,6 @@ import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||
import app.revanced.patches.youtube.utils.fix.fullscreen.FullscreenButtonViewStubPatch
|
||||
import app.revanced.patches.youtube.utils.fix.suggestedvideoendscreen.SuggestedVideoEndScreenPatch
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.OVERLAY_BUTTONS_PATH
|
||||
import app.revanced.patches.youtube.utils.playercontrols.PlayerControlsPatch
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
@ -30,7 +29,6 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
||||
FullscreenButtonViewStubPatch::class,
|
||||
PlayerControlsPatch::class,
|
||||
SettingsPatch::class,
|
||||
SuggestedVideoEndScreenPatch::class,
|
||||
OverlayButtonsBytecodePatch::class,
|
||||
VideoInformationPatch::class
|
||||
),
|
||||
|
@ -7,6 +7,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.youtube.utils.fix.suggestedvideoendscreen.fingerprints.RemoveOnLayoutChangeListenerFingerprint
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.PLAYER_CLASS_DESCRIPTOR
|
||||
import app.revanced.util.getTargetIndex
|
||||
import app.revanced.util.getTargetIndexReversed
|
||||
import app.revanced.util.getWalkerMethod
|
||||
@ -43,6 +44,10 @@ object SuggestedVideoEndScreenPatch : BytecodePatch(
|
||||
addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, $PLAYER_CLASS_DESCRIPTOR->hideSuggestedVideoEndScreen()Z
|
||||
move-result v0
|
||||
if-eqz v0, :show_suggested_video_end_screen
|
||||
|
||||
iget-object v0, p0, $iGetObjectReference
|
||||
|
||||
# This reference checks whether autoplay is turned on.
|
||||
|
Reference in New Issue
Block a user