refactor(settings): remove 'layout' label in string resource and code

This commit is contained in:
inotia00
2023-04-02 14:49:32 +09:00
parent 359e6e4dae
commit f690160996
67 changed files with 264 additions and 250 deletions

View File

@ -90,15 +90,15 @@ class GeneralAdsPatch : ResourcePatch {
"PREFERENCE: ADS_SETTINGS",
"SETTINGS: HIDE_GENERAL_ADS",
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"SETTINGS: HIDE_GENERAL_LAYOUT_ADS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_GENERAL_ADS",
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"PREFERENCE_HEADER: PLAYER",
"SETTINGS: HIDE_VIEW_PRODUCT",
"SETTINGS: DOUBLE_BACK_TIMEOUT",
"PREFERENCE: BOTTOM_PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: BOTTOM_PLAYER_SETTINGS",
"SETTINGS: COMMENT_COMPONENT_PARENT"
)
)

View File

@ -15,7 +15,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.litho.patch.LithoFilterPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.BOTTOM_LAYOUT
import app.revanced.util.integrations.Constants.BOTTOM_PLAYER
@Patch
@Name("hide-button-container")
@ -34,7 +34,7 @@ class ButtonContainerPatch : ResourcePatch {
val instructionList =
"""
move-object/from16 v3, p2
invoke-static {v3, v10}, $BOTTOM_LAYOUT->hideActionButtons(Ljava/lang/Object;Ljava/nio/ByteBuffer;)Z
invoke-static {v3, v10}, $BOTTOM_PLAYER->hideActionButtons(Ljava/lang/Object;Ljava/nio/ByteBuffer;)Z
move-result v10
if-eqz v10, :do_not_block
move-object/from16 v15, p1
@ -72,7 +72,7 @@ class ButtonContainerPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: BOTTOM_PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: BOTTOM_PLAYER_SETTINGS",
"SETTINGS: BUTTON_CONTAINER"
)
)

View File

@ -32,7 +32,7 @@ class CommentComponentPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: BOTTOM_PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: BOTTOM_PLAYER_SETTINGS",
"SETTINGS: COMMENT_COMPONENT_PARENT",
"SETTINGS: COMMENT_COMPONENTS"
)

View File

@ -32,7 +32,7 @@ class FlyoutPanelPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FLYOUT_PANEL_LAYOUT_SETTINGS",
"PREFERENCE: FLYOUT_PANEL_SETTINGS",
"SETTINGS: FLYOUT_PANEL_COMPONENT"
)
)

View File

@ -18,7 +18,7 @@ import app.revanced.patches.youtube.layout.flyoutpanel.oldqualitylayout.fingerpr
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.patches.youtube.misc.videoid.legacy.patch.LegacyVideoIdPatch
import app.revanced.util.integrations.Constants.FLYOUT_PANEL_LAYOUT
import app.revanced.util.integrations.Constants.FLYOUT_PANEL
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -47,7 +47,7 @@ class OldQualityLayoutPatch : BytecodePatch(
val register = (instruction(endIndex) as OneRegisterInstruction).registerA
addInstruction(
endIndex + 1,
"invoke-static { v$register }, $FLYOUT_PANEL_LAYOUT->enableOldQualityMenu(Landroid/widget/ListView;)V"
"invoke-static { v$register }, $FLYOUT_PANEL->enableOldQualityMenu(Landroid/widget/ListView;)V"
)
}
} ?: return QualityMenuViewInflateFingerprint.toErrorResult()
@ -58,7 +58,7 @@ class OldQualityLayoutPatch : BytecodePatch(
val register = (this.implementation!!.instructions[insertIndex] as OneRegisterInstruction).registerA
addInstructions(
insertIndex, """
invoke-static { v$register }, $FLYOUT_PANEL_LAYOUT->enableOldQualityLayout(I)I
invoke-static { v$register }, $FLYOUT_PANEL->enableOldQualityLayout(I)I
move-result v$register
"""
)
@ -70,7 +70,7 @@ class OldQualityLayoutPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FLYOUT_PANEL_LAYOUT_SETTINGS",
"PREFERENCE: FLYOUT_PANEL_SETTINGS",
"SETTINGS: ENABLE_OLD_QUALITY_LAYOUT"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
import app.revanced.util.integrations.Constants.FULLSCREEN
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
import org.jf.dexlib2.iface.instruction.Instruction
@ -68,7 +68,7 @@ class HideAutoplayPreviewPatch : BytecodePatch(
method.addInstructions(
insertIndex, """
invoke-static {}, $FULLSCREEN_LAYOUT->hideAutoPlayPreview()Z
invoke-static {}, $FULLSCREEN->hideAutoPlayPreview()Z
move-result v$dummyRegister
if-nez v$dummyRegister, :hidden
""", listOf(ExternalLabel("hidden", jumpInstruction))
@ -81,7 +81,7 @@ class HideAutoplayPreviewPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FULLSCREEN_LAYOUT_SETTINGS",
"PREFERENCE: FULLSCREEN_SETTINGS",
"SETTINGS: HIDE_AUTOPLAY_PREVIEW"
)
)

View File

@ -17,7 +17,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
import app.revanced.util.integrations.Constants.FULLSCREEN
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
@ -59,7 +59,7 @@ class HideEndScreenOverlayPatch : BytecodePatch() {
val dummyRegister = (instructions.elementAt(index) as Instruction31i).registerA
mutableMethod.addInstructions(
insertIndex, """
invoke-static {}, $FULLSCREEN_LAYOUT->hideEndScreenOverlay()Z
invoke-static {}, $FULLSCREEN->hideEndScreenOverlay()Z
move-result v$dummyRegister
if-eqz v$dummyRegister, :on
return-void
@ -85,7 +85,7 @@ class HideEndScreenOverlayPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FULLSCREEN_LAYOUT_SETTINGS",
"PREFERENCE: FULLSCREEN_SETTINGS",
"SETTINGS: HIDE_ENDSCREEN_OVERLAY"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.fullscreen.flimstripoverlay.fingerprints.ScrubbingLabelFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
import app.revanced.util.integrations.Constants.FULLSCREEN
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@ -45,7 +45,7 @@ class HideFilmstripOverlayPatch : BytecodePatch(
it.addInstructions(
index + 1, """
invoke-static {}, $FULLSCREEN_LAYOUT->hideFilmstripOverlay()Z
invoke-static {}, $FULLSCREEN->hideFilmstripOverlay()Z
move-result v$dummyRegister
if-eqz v$dummyRegister, :show
const/4 v$primaryRegister, 0x0
@ -61,7 +61,7 @@ class HideFilmstripOverlayPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FULLSCREEN_LAYOUT_SETTINGS",
"PREFERENCE: FULLSCREEN_SETTINGS",
"SETTINGS: HIDE_FILMSTRIP_OVERLAY"
)
)

View File

@ -43,7 +43,7 @@ class HideFullscreenButtonContainerBytecodePatch : BytecodePatch() {
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
val viewRegister = (invokeInstruction as Instruction21c).registerA
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/FullscreenLayoutPatch", "hideFullscreenButtonContainer")
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/FullscreenPatch", "hideFullscreenButtonContainer")
patchSuccessArray[0] = true
}

View File

@ -33,7 +33,7 @@ class HideFullscreenButtonContainerPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FULLSCREEN_LAYOUT_SETTINGS",
"PREFERENCE: FULLSCREEN_SETTINGS",
"SETTINGS: HIDE_FULLSCREEN_BUTTON_CONTAINER"
)
)

View File

@ -19,7 +19,7 @@ import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint
import app.revanced.patches.youtube.layout.fullscreen.fullscreenbuttoncontainer.bytecode.patch.HideFullscreenButtonContainerBytecodePatch
import app.revanced.patches.youtube.layout.fullscreen.fullscreenpanels.fingerprints.FullscreenViewAdderFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
import app.revanced.util.integrations.Constants.FULLSCREEN
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
@ -53,7 +53,7 @@ class HideFullscreenPanelsPatch : BytecodePatch(
addInstructions(
endIndex - 3, """
invoke-static {}, $FULLSCREEN_LAYOUT->hideFullscreenPanels()I
invoke-static {}, $FULLSCREEN->hideFullscreenPanels()I
move-result v$register
"""
)
@ -76,7 +76,7 @@ class HideFullscreenPanelsPatch : BytecodePatch(
method.addInstructions(
invokeIndex, """
invoke-static {}, $FULLSCREEN_LAYOUT->showFullscreenTitle()Z
invoke-static {}, $FULLSCREEN->showFullscreenTitle()Z
move-result v$dummyRegister
if-eqz v$dummyRegister, :hidden
""", listOf(ExternalLabel("hidden", method.instruction(invokeIndex + 1)))
@ -88,7 +88,7 @@ class HideFullscreenPanelsPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FULLSCREEN_LAYOUT_SETTINGS",
"PREFERENCE: FULLSCREEN_SETTINGS",
"SETTINGS: HIDE_FULLSCREEN_PANELS"
)
)

View File

@ -18,7 +18,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.fullscreen.hapticfeedback.fingerprints.*
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.FULLSCREEN_LAYOUT
import app.revanced.util.integrations.Constants.FULLSCREEN
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -56,7 +56,7 @@ class HapticFeedBackPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: FULLSCREEN_LAYOUT_SETTINGS",
"PREFERENCE: FULLSCREEN_SETTINGS",
"SETTINGS: DISABLE_HAPTIC_FEEDBACK"
)
)
@ -79,7 +79,7 @@ class HapticFeedBackPatch : BytecodePatch(
addInstructions(
insertIndex, """
invoke-static {}, $FULLSCREEN_LAYOUT->$targetMethodName()Z
invoke-static {}, $FULLSCREEN->$targetMethodName()Z
move-result v$dummyRegister
if-eqz v$dummyRegister, :vibrate
const-wide/16 v$targetRegister, 0x0
@ -91,7 +91,7 @@ class HapticFeedBackPatch : BytecodePatch(
addInstructions(
startIndex, """
invoke-static {}, $FULLSCREEN_LAYOUT->$targetMethodName()Z
invoke-static {}, $FULLSCREEN->$targetMethodName()Z
move-result v$dummyRegister
if-eqz v$dummyRegister, :vibrate
return-void
@ -103,7 +103,7 @@ class HapticFeedBackPatch : BytecodePatch(
fun MethodFingerprintResult.voidHaptics(targetMethodName: String) {
mutableMethod.addInstructions(
0, """
invoke-static {}, $FULLSCREEN_LAYOUT->$targetMethodName()Z
invoke-static {}, $FULLSCREEN->$targetMethodName()Z
move-result v0
if-eqz v0, :vibrate
return-void

View File

@ -18,7 +18,7 @@ import app.revanced.patches.youtube.layout.general.accountmenu.fingerprints.Acco
import app.revanced.patches.youtube.layout.general.accountmenu.fingerprints.AccountMenuParentFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -47,7 +47,7 @@ class AccountMenuPatch : BytecodePatch(
addInstruction(
targetIndex + 1,
"invoke-static {v$register}, $GENERAL_LAYOUT->hideAccountMenu(Landroid/text/Spanned;)V"
"invoke-static {v$register}, $GENERAL->hideAccountMenu(Landroid/text/Spanned;)V"
)
}
} ?: return AccountMenuFingerprint.toErrorResult()
@ -58,7 +58,7 @@ class AccountMenuPatch : BytecodePatch(
addInstruction(
endIndex + 1,
"sput-object v$register, $GENERAL_LAYOUT->compactLink:Landroid/view/View;"
"sput-object v$register, $GENERAL->compactLink:Landroid/view/View;"
)
}
} ?: return AccountMenuParentFingerprint.toErrorResult()
@ -68,7 +68,7 @@ class AccountMenuPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_ACCOUNT_MENU"
)
)

View File

@ -20,7 +20,7 @@ import app.revanced.patches.shared.fingerprints.SubtitleTrackFingerprint
import app.revanced.patches.youtube.layout.general.autocaptions.fingerprints.StartVideoInformerFingerprint
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
@Patch
@Name("hide-auto-captions")
@ -50,7 +50,7 @@ class AutoCaptionsPatch : BytecodePatch(
0,
"""
const/4 v0, ${status.value}
sput-boolean v0, $GENERAL_LAYOUT->captionsButtonStatus:Z
sput-boolean v0, $GENERAL->captionsButtonStatus:Z
"""
)
}
@ -59,10 +59,10 @@ class AutoCaptionsPatch : BytecodePatch(
SubtitleTrackFingerprint.result?.mutableMethod?.let {
it.addInstructions(
0, """
invoke-static {}, $GENERAL_LAYOUT->hideAutoCaptions()Z
invoke-static {}, $GENERAL->hideAutoCaptions()Z
move-result v0
if-eqz v0, :auto_captions_shown
sget-boolean v0, $GENERAL_LAYOUT->captionsButtonStatus:Z
sget-boolean v0, $GENERAL->captionsButtonStatus:Z
if-nez v0, :auto_captions_shown
const/4 v0, 0x1
return v0
@ -75,7 +75,7 @@ class AutoCaptionsPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_AUTO_CAPTIONS"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.autopopuppanels.fingerprints.EngagementPanelControllerFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
@Patch
@Name("hide-auto-player-popup-panels")
@ -34,7 +34,7 @@ class PlayerPopupPanelsPatch : BytecodePatch(
EngagementPanelControllerFingerprint.result?.mutableMethod?.let {
it.addInstructions(
0, """
invoke-static {}, $GENERAL_LAYOUT->hideAutoPlayerPopupPanels()Z
invoke-static {}, $GENERAL->hideAutoPlayerPopupPanels()Z
move-result v0
if-eqz v0, :player_popup_panels_shown
if-eqz p4, :player_popup_panels_shown
@ -49,7 +49,7 @@ class PlayerPopupPanelsPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_AUTO_PLAYER_POPUP_PANELS"
)
)

View File

@ -19,7 +19,7 @@ import app.revanced.patches.youtube.layout.general.categorybar.fingerprints.Rela
import app.revanced.patches.youtube.layout.general.categorybar.fingerprints.SearchResultsChipBarFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@ -54,7 +54,7 @@ class CategoryBarPatch : BytecodePatch(
addInstructions(
insertIndex, """
invoke-static {v$register}, $GENERAL_LAYOUT->hideCategoryBarInFeed(I)I
invoke-static {v$register}, $GENERAL->hideCategoryBarInFeed(I)I
move-result v$register
"""
)
@ -71,7 +71,7 @@ class CategoryBarPatch : BytecodePatch(
addInstruction(
insertIndex + 1,
"invoke-static {v$register}, $GENERAL_LAYOUT->hideCategoryBarInRelatedVideo(Landroid/view/View;)V"
"invoke-static {v$register}, $GENERAL->hideCategoryBarInRelatedVideo(Landroid/view/View;)V"
)
}
} ?: return RelatedChipCloudFingerprint.toErrorResult()
@ -86,7 +86,7 @@ class CategoryBarPatch : BytecodePatch(
addInstructions(
targetIndex + 1, """
invoke-static {v$register}, $GENERAL_LAYOUT->hideCategoryBarInSearchResults(I)I
invoke-static {v$register}, $GENERAL->hideCategoryBarInSearchResults(I)I
move-result v$register
"""
)
@ -98,7 +98,7 @@ class CategoryBarPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_CATEGORY_BAR"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.channellistsubmenu.fingerprints.ChannelListSubMenuFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -44,7 +44,7 @@ class ChannelListSubMenuPatch : BytecodePatch(
addInstruction(
endIndex + 1,
"invoke-static {v$register}, $GENERAL_LAYOUT->hideChannelListSubMenu(Landroid/view/View;)V"
"invoke-static {v$register}, $GENERAL->hideChannelListSubMenu(Landroid/view/View;)V"
)
}
} ?: return ChannelListSubMenuFingerprint.toErrorResult()
@ -54,7 +54,7 @@ class ChannelListSubMenuPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_CHANNEL_LIST_SUBMENU"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.crowdfundingbox.fingerprints.CrowdfundingBoxFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Patch
@ -44,7 +44,7 @@ class CrowdfundingBoxPatch : BytecodePatch(
addInstruction(
insertIndex,
"invoke-static {v$register}, $GENERAL_LAYOUT->hideCrowdfundingBox(Landroid/view/View;)V"
"invoke-static {v$register}, $GENERAL->hideCrowdfundingBox(Landroid/view/View;)V"
)
}
} ?: return CrowdfundingBoxFingerprint.toErrorResult()
@ -54,7 +54,7 @@ class CrowdfundingBoxPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_CROWDFUNDING_BOX"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.floatingmicrophone.fingerprints.FloatingMicrophoneFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Patch
@ -44,7 +44,7 @@ class FloatingMicrophonePatch : BytecodePatch(
addInstructions(
insertIndex + 1, """
invoke-static {v$register}, $GENERAL_LAYOUT->hideFloatingMicrophone(Z)Z
invoke-static {v$register}, $GENERAL->hideFloatingMicrophone(Z)Z
move-result v$register
"""
)
@ -56,7 +56,7 @@ class FloatingMicrophonePatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_FLOATING_MICROPHONE"
)
)

View File

@ -15,6 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
@ -56,7 +57,7 @@ class HeaderSwitchPatch : BytecodePatch() {
mutableMethod.addInstructions(
insertIndex, """
invoke-static {v$viewRegister}, Lapp/revanced/integrations/patches/layout/GeneralLayoutPatch;->enablePremiumHeader(I)I
invoke-static {v$viewRegister}, $GENERAL->enablePremiumHeader(I)I
move-result v$viewRegister
"""
)
@ -80,7 +81,7 @@ class HeaderSwitchPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HEADER_SWITCH"
)
)

View File

@ -32,7 +32,7 @@ class MixPlaylistsPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_MIX_PLAYLISTS"
)
)

View File

@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.personalinformation.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -38,7 +38,7 @@ class HideEmailAddressPatch : BytecodePatch(
addInstructions(
insertIndex, """
invoke-static {v$register}, $GENERAL_LAYOUT->hideEmailAddress(I)I
invoke-static {v$register}, $GENERAL->hideEmailAddress(I)I
move-result v$register
"""
)
@ -50,7 +50,7 @@ class HideEmailAddressPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_EMAIL_ADDRESS"
)
)

View File

@ -24,7 +24,7 @@ import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.bytecode.BytecodeHelper.updatePatchStatus
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@ -79,7 +79,7 @@ class ShortsComponentPatch : BytecodePatch(
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
val viewRegister = (instructions.elementAt(index + 3) as OneRegisterInstruction).registerA
mutableMethod.implementation!!.injectHideCall(index + 4, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerCommentsButton")
mutableMethod.implementation!!.injectHideCall(index + 4, viewRegister, "layout/GeneralPatch", "hideShortsPlayerCommentsButton")
patchSuccessArray[0] = true
}
@ -92,7 +92,7 @@ class ShortsComponentPatch : BytecodePatch(
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
val viewRegister = (invokeInstruction as Instruction21c).registerA
mutableMethod.implementation!!.injectHideCall(index - 1, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerRemixButton")
mutableMethod.implementation!!.injectHideCall(index - 1, viewRegister, "layout/GeneralPatch", "hideShortsPlayerRemixButton")
patchSuccessArray[1] = true
}
@ -105,7 +105,7 @@ class ShortsComponentPatch : BytecodePatch(
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
val viewRegister = (invokeInstruction as Instruction21c).registerA
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideShortsPlayerSubscriptionsButton")
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralPatch", "hideShortsPlayerSubscriptionsButton")
patchSuccessArray[2] = true
}
@ -137,7 +137,7 @@ class ShortsComponentPatch : BytecodePatch(
it.addInstructions(
insertIndex,"""
invoke-static {v$register}, $GENERAL_LAYOUT->hideShortsPlayerSubscriptionsButton(I)I
invoke-static {v$register}, $GENERAL->hideShortsPlayerSubscriptionsButton(I)I
move-result v$register
"""
)
@ -156,7 +156,7 @@ class ShortsComponentPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: SHORTS_COMPONENT.PARENT",
"SETTINGS: SHORTS_COMPONENT_PARENT.A",
"SETTINGS: SHORTS_COMPONENT_PARENT.B",

View File

@ -16,7 +16,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.snackbar.fingerprints.HideSnackbarFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
@Patch
@Name("hide-snackbar")
@ -34,7 +34,7 @@ class HideSnackbarPatch : BytecodePatch(
HideSnackbarFingerprint.result?.mutableMethod?.let {
it.addInstructions(
0, """
invoke-static {}, $GENERAL_LAYOUT->hideSnackbar()Z
invoke-static {}, $GENERAL->hideSnackbar()Z
move-result v0
if-eqz v0, :default
return-void
@ -47,7 +47,7 @@ class HideSnackbarPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_SNACKBAR"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.startupshortsreset.fingerprints.UserWasInShortsFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -39,7 +39,7 @@ class HideShortsOnStartupPatch : BytecodePatch(
val register = (instruction(insertIndex - 1) as OneRegisterInstruction).registerA + 2
addInstructions(
insertIndex, """
invoke-static { }, $GENERAL_LAYOUT->hideStartupShortsPlayer()Z
invoke-static { }, $GENERAL->hideStartupShortsPlayer()Z
move-result v$register
if-eqz v$register, :show_startup_shorts_player
return-void
@ -53,7 +53,7 @@ class HideShortsOnStartupPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: SHORTS_COMPONENT.PARENT",
"SETTINGS: SHORTS_COMPONENT_PARENT.B",
"SETTINGS: HIDE_STARTUP_SHORTS_PLAYER"

View File

@ -57,7 +57,7 @@ class HideStoriesPatch : BytecodePatch() {
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
val viewRegister = (iPutInstruction as Instruction22c).registerA
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralLayoutPatch", "hideStoriesShelf")
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/GeneralPatch", "hideStoriesShelf")
patchSuccessArray[0] = true
patchSuccessArray[1] = true
@ -79,7 +79,7 @@ class HideStoriesPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: HIDE_STORIES_SHELF"
)
)

View File

@ -19,7 +19,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.tabletminiplayer.fingerprints.*
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@ -69,7 +69,7 @@ class TabletMiniPlayerPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: ENABLE_TABLET_MINIPLAYER"
)
)
@ -92,7 +92,7 @@ class TabletMiniPlayerPatch : BytecodePatch(
this.addInstructions(
index,
"""
invoke-static {v$overrideRegister}, $GENERAL_LAYOUT->enableTabletMiniPlayer(Z)Z
invoke-static {v$overrideRegister}, $GENERAL->enableTabletMiniPlayer(Z)Z
move-result v$overrideRegister
"""
)

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.widesearchbar.fingerprints
package app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.widesearchbar.fingerprints
package app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.widesearchbar.fingerprints
package app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.widesearchbar.fingerprints
package app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.widesearchbar.patch
package app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
@ -15,14 +15,18 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.widesearchbar.fingerprints.*
import app.revanced.patches.youtube.layout.general.widesearchbar.bytecode.fingerprints.*
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.GENERAL
@Patch
@Name("enable-wide-searchbar")
@Description("Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.")
@DependsOn([SettingsPatch::class])
@DependsOn(
[
SettingsPatch::class
]
)
@YouTubeCompatibility
@Version("0.0.1")
class WideSearchbarPatch : BytecodePatch(
@ -58,7 +62,7 @@ class WideSearchbarPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: GENERAL_SETTINGS",
"SETTINGS: ENABLE_WIDE_SEARCHBAR"
)
)
@ -72,7 +76,7 @@ class WideSearchbarPatch : BytecodePatch(
val index = method.implementation!!.instructions.size - 1
method.addInstructions(
index, """
invoke-static {}, $GENERAL_LAYOUT->enableWideSearchbar()Z
invoke-static {}, $GENERAL->enableWideSearchbar()Z
move-result p0
"""
)

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.createbutton.fingerprints
package app.revanced.patches.youtube.layout.navigation.createbutton.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.createbutton.patch
package app.revanced.patches.youtube.layout.navigation.createbutton.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
@ -12,10 +12,10 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
import app.revanced.patches.youtube.layout.general.pivotbar.createbutton.fingerprints.PivotBarFingerprint
import app.revanced.patches.youtube.layout.navigation.createbutton.fingerprints.PivotBarFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.NAVIGATION
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
import app.revanced.util.pivotbar.InjectionUtils.injectHook
import org.jf.dexlib2.dexbacked.reference.DexBackedMethodReference
@ -73,7 +73,7 @@ class CreateButtonRemoverPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: NAVIGATION_SETTINGS",
"SETTINGS: HIDE_CREATE_BUTTON"
)
)
@ -89,7 +89,7 @@ class CreateButtonRemoverPatch : BytecodePatch(
private companion object {
const val hook =
"invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, $GENERAL_LAYOUT" +
"invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, $NAVIGATION" +
"->" +
"hideCreateButton(Landroid/view/View;)V"

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints
package app.revanced.patches.youtube.layout.navigation.shortsbutton.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints
package app.revanced.patches.youtube.layout.navigation.shortsbutton.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.patch
package app.revanced.patches.youtube.layout.navigation.shortsbutton.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
@ -13,11 +13,11 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint
import app.revanced.patches.youtube.layout.general.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
import app.revanced.patches.youtube.layout.navigation.shortsbutton.fingerprints.PivotBarEnumFingerprint
import app.revanced.patches.youtube.layout.navigation.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.NAVIGATION
import app.revanced.util.pivotbar.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
import app.revanced.util.pivotbar.InjectionUtils.injectHook
@ -77,9 +77,7 @@ class ShortsButtonRemoverPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"SETTINGS: SHORTS_COMPONENT.PARENT",
"SETTINGS: SHORTS_COMPONENT_PARENT.A",
"PREFERENCE: NAVIGATION_SETTINGS",
"SETTINGS: HIDE_SHORTS_BUTTON"
)
)
@ -90,12 +88,12 @@ class ShortsButtonRemoverPatch : BytecodePatch(
}
private companion object {
const val enumHook =
"sput-object v$REGISTER_TEMPLATE_REPLACEMENT, $GENERAL_LAYOUT" +
"sput-object v$REGISTER_TEMPLATE_REPLACEMENT, $NAVIGATION" +
"->" +
"lastPivotTab:Ljava/lang/Enum;"
const val buttonHook =
"invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, $GENERAL_LAYOUT" +
"invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, $NAVIGATION" +
"->" +
"hideShortsButton(Landroid/view/View;)V"
}

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortspivotbar.fingerprints
package app.revanced.patches.youtube.layout.navigation.shortsnavbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortspivotbar.fingerprints
package app.revanced.patches.youtube.layout.navigation.shortsnavbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortspivotbar.fingerprints
package app.revanced.patches.youtube.layout.navigation.shortsnavbar.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortspivotbar.fingerprints
package app.revanced.patches.youtube.layout.navigation.shortsnavbar.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.shortspivotbar.patch
package app.revanced.patches.youtube.layout.navigation.shortsnavbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
@ -16,20 +16,20 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.fingerprints.PivotBarCreateButtonViewFingerprint
import app.revanced.patches.youtube.layout.general.pivotbar.shortspivotbar.fingerprints.*
import app.revanced.patches.youtube.layout.navigation.shortsnavbar.fingerprints.*
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.NAVIGATION
import org.jf.dexlib2.dexbacked.reference.DexBackedTypeReference
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Patch
@Name("hide-shorts-pivot-bar")
@Description("Hides the pivotbar when playing shorts.")
@Name("hide-shorts-navbar")
@Description("Hide navigation bar when playing shorts.")
@DependsOn([SettingsPatch::class])
@YouTubeCompatibility
@Version("0.0.1")
class ShortsPivotBarPatch : BytecodePatch(
class ShortsNavBarPatch : BytecodePatch(
listOf(
PivotBarCreateButtonViewFingerprint,
ReelWatchBundleFingerprint,
@ -50,7 +50,7 @@ class ShortsPivotBarPatch : BytecodePatch(
addInstruction(
startIndex + 1,
"sput-object v$register, $GENERAL_LAYOUT->pivotbar:$targetReference"
"sput-object v$register, $NAVIGATION->pivotbar:$targetReference"
)
}
} ?: return SetPivotBarFingerprint.toErrorResult()
@ -64,7 +64,7 @@ class ShortsPivotBarPatch : BytecodePatch(
) {
addInstruction(
0,
"invoke-static {}, $GENERAL_LAYOUT->hideShortsPlayerPivotBar()V"
"invoke-static {}, $NAVIGATION->hideShortsPlayerNavBar()V"
)
}
} ?: return ReelWatchBundleFingerprint.toErrorResult()
@ -72,7 +72,7 @@ class ShortsPivotBarPatch : BytecodePatch(
ReelWatchEndpointParentFingerprint.result?.let { parentResult ->
ReelWatchEndpointFingerprint.also { it.resolve(context, parentResult.classDef) }.result?.mutableMethod?.addInstruction(
0,
"sput-object p1, $GENERAL_LAYOUT->shortsContext:Landroid/content/Context;"
"sput-object p1, $NAVIGATION->shortsContext:Landroid/content/Context;"
) ?: return ReelWatchEndpointFingerprint.toErrorResult()
} ?: return ReelWatchEndpointParentFingerprint.toErrorResult()
@ -81,14 +81,12 @@ class ShortsPivotBarPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"SETTINGS: SHORTS_COMPONENT.PARENT",
"SETTINGS: SHORTS_COMPONENT_PARENT.B",
"SETTINGS: HIDE_SHORTS_PLAYER_PIVOT_BAR"
"PREFERENCE: NAVIGATION_SETTINGS",
"SETTINGS: HIDE_SHORTS_NAVIGATION_BAR"
)
)
SettingsPatch.updatePatchStatus("hide-shorts-pivot-bar")
SettingsPatch.updatePatchStatus("hide-shorts-navbar")
return PatchResultSuccess()
}

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.switchbutton.fingerprints
package app.revanced.patches.youtube.layout.navigation.switchbutton.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.pivotbar.switchbutton.patch
package app.revanced.patches.youtube.layout.navigation.switchbutton.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
@ -13,9 +13,9 @@ import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.general.pivotbar.switchbutton.fingerprints.AutoMotiveFingerprint
import app.revanced.patches.youtube.layout.navigation.switchbutton.fingerprints.AutoMotiveFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.GENERAL_LAYOUT
import app.revanced.util.integrations.Constants.NAVIGATION
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@ -36,7 +36,7 @@ class SwitchCreateButtonPatch : BytecodePatch(
addInstructions(
insertIndex, """
invoke-static {v$register}, $GENERAL_LAYOUT->switchCreateNotification(Z)Z
invoke-static {v$register}, $NAVIGATION->switchCreateNotification(Z)Z
move-result v$register
"""
)
@ -48,7 +48,7 @@ class SwitchCreateButtonPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: GENERAL_LAYOUT_SETTINGS",
"PREFERENCE: NAVIGATION_SETTINGS",
"SETTINGS: SWITCH_CREATE_NOTIFICATION"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.fingerprints.LayoutConstructorFingerprint
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
import org.jf.dexlib2.iface.instruction.Instruction
@ -68,7 +68,7 @@ class HideAutoplayButtonPatch : BytecodePatch(
method.addInstructions(
insertIndex, """
invoke-static {}, $PLAYER_LAYOUT->hideAutoPlayButton()Z
invoke-static {}, $PLAYER->hideAutoPlayButton()Z
move-result v$dummyRegister
if-nez v$dummyRegister, :hidden
""", listOf(ExternalLabel("hidden", jumpInstruction))
@ -81,7 +81,7 @@ class HideAutoplayButtonPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_AUTOPLAY_BUTTON"
)
)

View File

@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.fingerprints.SubtitleButtonControllerFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
import org.jf.dexlib2.Opcode
@Patch
@ -37,7 +37,7 @@ class HideCaptionsButtonBytecodePatch : BytecodePatch(
it.addInstruction(
index + 1,
"invoke-static {v0}, $PLAYER_LAYOUT->hideCaptionsButton(Landroid/widget/ImageView;)V"
"invoke-static {v0}, $PLAYER->hideCaptionsButton(Landroid/widget/ImageView;)V"
)
break
@ -50,7 +50,7 @@ class HideCaptionsButtonBytecodePatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_CAPTIONS_BUTTON"
)
)

View File

@ -12,7 +12,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
@Patch
@Name("hide-cast-button")
@ -30,7 +30,7 @@ class HideCastButtonPatch : BytecodePatch() {
setVisibilityMethod.addInstructions(
0, """
invoke-static {p1}, $PLAYER_LAYOUT->hideCastButton(I)I
invoke-static {p1}, $PLAYER->hideCastButton(I)I
move-result p1
"""
)
@ -43,7 +43,7 @@ class HideCastButtonPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_CAST_BUTTON"
)
)

View File

@ -32,7 +32,7 @@ class HideCollapseButtonPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_COLLAPSE_BUTTON"
)
)

View File

@ -43,7 +43,7 @@ class HideEndscreenCardsPatch : BytecodePatch(
val index = this.scanResult.patternScanResult!!.endIndex
with (this.mutableMethod) {
val register = (this.instruction(index) as Instruction21c).registerA
this.implementation!!.injectHideCall(index + 1, register, "layout/PlayerLayoutPatch", "hideEndscreen")
this.implementation!!.injectHideCall(index + 1, register, "layout/PlayerPatch", "hideEndscreen")
}
}
@ -60,7 +60,7 @@ class HideEndscreenCardsPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_ENDSCREEN_CARDS"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.player.infocards.fingerprints.InfocardsIncognitoFingerprint
import app.revanced.patches.youtube.layout.player.infocards.fingerprints.InfocardsIncognitoParentFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
@Patch
@Name("hide-info-cards")
@ -34,7 +34,7 @@ class HideInfocardsPatch : BytecodePatch(
}.result?.mutableMethod?.
addInstructions(
1, """
invoke-static {v0}, $PLAYER_LAYOUT->hideInfoCard(Z)Z
invoke-static {v0}, $PLAYER->hideInfoCard(Z)Z
move-result v0
"""
) ?: return InfocardsIncognitoFingerprint.toErrorResult()
@ -45,7 +45,7 @@ class HideInfocardsPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_INFO_CARDS"
)
)

View File

@ -32,7 +32,7 @@ class HideLiveChatButtonPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_LIVE_CHATS_BUTTON"
)
)

View File

@ -15,7 +15,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.player.musicbutton.fingerprints.MusicAppDeeplinkButtonFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
import org.jf.dexlib2.iface.instruction.Instruction
@Patch
@ -34,7 +34,7 @@ class HideMusicButtonPatch : BytecodePatch(
val jumpInstruction = this[size - 1] as Instruction
it.addInstructions(
0, """
invoke-static {}, $PLAYER_LAYOUT->hideMusicButton()Z
invoke-static {}, $PLAYER->hideMusicButton()Z
move-result v0
if-nez v0, :hidden
""", listOf(ExternalLabel("hidden", jumpInstruction))
@ -47,7 +47,7 @@ class HideMusicButtonPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_YOUTUBE_MUSIC_BUTTON"
)
)

View File

@ -32,7 +32,7 @@ class HideNextPrevButtonPatch : ResourcePatch {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_NEXT_BUTTON",
"SETTINGS: HIDE_PREV_BUTTON"
)

View File

@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object HidePlayerButtonFingerprint : MethodFingerprint (
customFingerprint = {
it.definingClass == "Lapp/revanced/integrations/patches/layout/PlayerLayoutPatch;"
it.definingClass == "Lapp/revanced/integrations/patches/layout/PlayerPatch;"
&& it.name == "hidePlayerButton"
}
)

View File

@ -44,7 +44,7 @@ class HidePlayerButtonBackgroundPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_PLAYER_BUTTON_BACKGROUND"
)
)

View File

@ -17,6 +17,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
@ -64,7 +65,7 @@ class PlayerOverlayFilterPatch : BytecodePatch() {
mutableMethod.addInstructions(
insertIndex + 1, """
invoke-static {}, Lapp/revanced/integrations/patches/layout/PlayerLayoutPatch;->hidePlayerOverlayFilter()Z
invoke-static {}, $PLAYER->hidePlayerOverlayFilter()Z
move-result v$dummyRegister
if-eqz v$dummyRegister, :currentcolor
const v$dummyRegister, $transparent
@ -92,7 +93,7 @@ class PlayerOverlayFilterPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_PLAYER_OVERLAY_FILTER"
)
)

View File

@ -61,7 +61,7 @@ class SuggestedActionsPatch : BytecodePatch() {
val mutableMethod = context.proxy(classDef).mutableClass.findMutableMethodOf(method)
val viewRegister = (iPutInstruction as Instruction22c).registerA
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/PlayerLayoutPatch", "hideSuggestedActions")
mutableMethod.implementation!!.injectHideCall(insertIndex, viewRegister, "layout/PlayerPatch", "hideSuggestedActions")
patchSuccessArray[0] = true
}
@ -84,7 +84,7 @@ class SuggestedActionsPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_SUGGESTED_ACTION"
)
)

View File

@ -18,7 +18,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.player.watermark.fingerprints.HideWatermarkFingerprint
import app.revanced.patches.youtube.layout.player.watermark.fingerprints.HideWatermarkParentFingerprint
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Patch
@ -43,7 +43,7 @@ class HideChannelWatermarkBytecodePatch : BytecodePatch(
removeInstruction(insertIndex)
addInstructions(
insertIndex, """
invoke-static {}, $PLAYER_LAYOUT->hideChannelWatermark()Z
invoke-static {}, $PLAYER->hideChannelWatermark()Z
move-result v$register
"""
)
@ -56,7 +56,7 @@ class HideChannelWatermarkBytecodePatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: PLAYER_LAYOUT_SETTINGS",
"PREFERENCE: PLAYER_SETTINGS",
"SETTINGS: HIDE_CHANNEL_WATERMARK"
)
)

View File

@ -15,7 +15,7 @@ import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.patches.youtube.misc.timebar.patch.HookTimebarPatch
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
import app.revanced.util.integrations.Constants.SEEKBAR
@Patch
@Name("hide-seekbar")
@ -35,7 +35,7 @@ class HideSeekbarPatch : BytecodePatch() {
insertMethod.addInstructions(
0, """
invoke-static {}, $SEEKBAR_LAYOUT->hideSeekbar()Z
invoke-static {}, $SEEKBAR->hideSeekbar()Z
move-result v0
if-eqz v0, :show_seekbar
return-void
@ -47,7 +47,7 @@ class HideSeekbarPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: SEEKBAR_LAYOUT_SETTINGS",
"PREFERENCE: SEEKBAR_SETTINGS",
"SETTINGS: HIDE_SEEKBAR"
)
)

View File

@ -15,7 +15,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
import app.revanced.util.integrations.Constants.SEEKBAR
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
@ -58,7 +58,7 @@ class SeekbarColorPatch : BytecodePatch() {
mutableMethod.addInstructions(
registerIndex + 1, """
invoke-static {v$viewRegister}, $SEEKBAR_LAYOUT->enableCustomSeekbarColor(I)I
invoke-static {v$viewRegister}, $SEEKBAR->enableCustomSeekbarColor(I)I
move-result v$viewRegister
"""
)
@ -82,7 +82,7 @@ class SeekbarColorPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: SEEKBAR_LAYOUT_SETTINGS",
"PREFERENCE: SEEKBAR_SETTINGS",
"SETTINGS: CUSTOM_SEEKBAR_COLOR"
)
)

View File

@ -18,7 +18,7 @@ import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.S
import app.revanced.patches.youtube.layout.seekbar.seekbartapping.fingerprints.SeekbarTappingParentFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
import app.revanced.util.integrations.Constants.SEEKBAR
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.formats.Instruction11n
@ -77,7 +77,7 @@ class SeekbarTappingPatch : BytecodePatch(
addInstructions(
insertIndex, """
invoke-static {}, $SEEKBAR_LAYOUT->enableSeekbarTapping()Z
invoke-static {}, $SEEKBAR->enableSeekbarTapping()Z
move-result v0
if-eqz v0, :off
invoke-virtual { v$register, v2 }, ${oMethod.definingClass}->${oMethod.name}(I)V
@ -92,7 +92,7 @@ class SeekbarTappingPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: SEEKBAR_LAYOUT_SETTINGS",
"PREFERENCE: SEEKBAR_SETTINGS",
"SETTINGS: ENABLE_SEEKBAR_TAPPING"
)
)

View File

@ -16,7 +16,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.shared.patch.mapping.ResourceMappingPatch
import app.revanced.patches.youtube.misc.overridespeed.bytecode.patch.OverrideSpeedHookPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
import app.revanced.util.integrations.Constants.SEEKBAR
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.dexbacked.instruction.DexBackedInstruction35c
import org.jf.dexlib2.iface.instruction.formats.Instruction31i
@ -66,7 +66,7 @@ class AppendSpeedPatch : BytecodePatch() {
val insertRegister = (instructions.elementAt(insertIndex) as Instruction35c).registerC
mutableMethod.addInstructions(
insertIndex, """
invoke-static {v$insertRegister}, $SEEKBAR_LAYOUT->enableTimeStampSpeed(Ljava/lang/String;)Ljava/lang/String;
invoke-static {v$insertRegister}, $SEEKBAR->enableTimeStampSpeed(Ljava/lang/String;)Ljava/lang/String;
move-result-object v$insertRegister
"""
)
@ -91,7 +91,7 @@ class AppendSpeedPatch : BytecodePatch() {
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: SEEKBAR_LAYOUT_SETTINGS",
"PREFERENCE: SEEKBAR_SETTINGS",
"SETTINGS: ENABLE_TIME_STAMP_SPEED"
)
)

View File

@ -17,7 +17,7 @@ import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.layout.seekbar.timestamps.fingerprints.TimeStampsContainerFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.util.integrations.Constants.SEEKBAR_LAYOUT
import app.revanced.util.integrations.Constants.SEEKBAR
@Patch
@Name("hide-time-stamp")
@ -40,7 +40,7 @@ class HideTimeStampPatch : BytecodePatch(
TimeStampsContainerFingerprint.result?.mutableMethod?.let {
it.addInstructions(
0, """
invoke-static {}, $SEEKBAR_LAYOUT->hideTimeStamp()Z
invoke-static {}, $SEEKBAR->hideTimeStamp()Z
move-result v0
if-eqz v0, :show_time_stamp
return-void
@ -53,7 +53,7 @@ class HideTimeStampPatch : BytecodePatch(
*/
SettingsPatch.addPreference(
arrayOf(
"PREFERENCE: SEEKBAR_LAYOUT_SETTINGS",
"PREFERENCE: SEEKBAR_SETTINGS",
"SETTINGS: HIDE_TIME_STAMP"
)
)

View File

@ -14,7 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.annotation.YouTubeCompatibility
import app.revanced.patches.youtube.misc.playerbutton.fingerprints.LiveChatFingerprint
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
import app.revanced.util.integrations.Constants.PLAYER_LAYOUT
import app.revanced.util.integrations.Constants.PLAYER
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
@ -58,7 +58,7 @@ class PlayerButtonPatch : BytecodePatch(
addInstructions(
index, """
invoke-static {v$firstRegister, v$secondRegister}, $PLAYER_LAYOUT->hidePlayerButton(Landroid/view/View;I)I
invoke-static {v$firstRegister, v$secondRegister}, $PLAYER->hidePlayerButton(Landroid/view/View;I)I
move-result v$secondRegister
"""
)