mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 13:47:42 +02:00
fix(YouTube/Hide handle): handle is not hidden in You tab
This commit is contained in:
@ -7,16 +7,19 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.youtube.general.personalinformation.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
import app.revanced.patches.youtube.general.handle.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||||
|
import app.revanced.patches.youtube.utils.litho.LithoFilterPatch
|
||||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||||
import app.revanced.util.integrations.Constants.GENERAL
|
import app.revanced.util.integrations.Constants.GENERAL
|
||||||
|
import app.revanced.util.integrations.Constants.PATCHES_PATH
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Hide handle",
|
name = "Hide handle",
|
||||||
description = "Hides the handle in the account switcher.",
|
description = "Hides the handle in the account switcher and You tab.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
LithoFilterPatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
],
|
],
|
||||||
@ -44,6 +47,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
object HideHandlePatch : BytecodePatch(
|
object HideHandlePatch : BytecodePatch(
|
||||||
setOf(AccountSwitcherAccessibilityLabelFingerprint)
|
setOf(AccountSwitcherAccessibilityLabelFingerprint)
|
||||||
) {
|
) {
|
||||||
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
|
"$PATCHES_PATH/ads/HandlesFilter;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|
||||||
AccountSwitcherAccessibilityLabelFingerprint.result?.let {
|
AccountSwitcherAccessibilityLabelFingerprint.result?.let {
|
||||||
@ -53,20 +59,22 @@ object HideHandlePatch : BytecodePatch(
|
|||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
targetIndex + 2, """
|
targetIndex + 2, """
|
||||||
invoke-static {v$targetRegister}, $GENERAL->hideEmailAddress(I)I
|
invoke-static {v$targetRegister}, $GENERAL->hideHandle(I)I
|
||||||
move-result v$targetRegister
|
move-result v$targetRegister
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: throw AccountSwitcherAccessibilityLabelFingerprint.exception
|
} ?: throw AccountSwitcherAccessibilityLabelFingerprint.exception
|
||||||
|
|
||||||
|
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add settings
|
* Add settings
|
||||||
*/
|
*/
|
||||||
SettingsPatch.addPreference(
|
SettingsPatch.addPreference(
|
||||||
arrayOf(
|
arrayOf(
|
||||||
"PREFERENCE: GENERAL_SETTINGS",
|
"PREFERENCE: GENERAL_SETTINGS",
|
||||||
"SETTINGS: HIDE_EMAIL_ADDRESS"
|
"SETTINGS: HIDE_HANDLE"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.general.personalinformation.fingerprints
|
package app.revanced.patches.youtube.general.handle.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.AccountSwitcherAccessibility
|
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.AccountSwitcherAccessibility
|
||||||
|
@ -299,9 +299,6 @@ Only available to some users who can use the speed overlay"</string>
|
|||||||
<string name="revanced_hide_crowdfunding_box_summary_off">Crowdfunding box is shown</string>
|
<string name="revanced_hide_crowdfunding_box_summary_off">Crowdfunding box is shown</string>
|
||||||
<string name="revanced_hide_crowdfunding_box_summary_on">Crowdfunding box is hidden</string>
|
<string name="revanced_hide_crowdfunding_box_summary_on">Crowdfunding box is hidden</string>
|
||||||
<string name="revanced_hide_crowdfunding_box_title">Hide crowdfunding box</string>
|
<string name="revanced_hide_crowdfunding_box_title">Hide crowdfunding box</string>
|
||||||
<string name="revanced_hide_email_address_summary_off">Email address (handle) is shown</string>
|
|
||||||
<string name="revanced_hide_email_address_summary_on">Email address (handle) is hidden</string>
|
|
||||||
<string name="revanced_hide_email_address_title">Hide email address (handle)</string>
|
|
||||||
<string name="revanced_hide_emoji_picker_summary_off">Emoji picker is shown</string>
|
<string name="revanced_hide_emoji_picker_summary_off">Emoji picker is shown</string>
|
||||||
<string name="revanced_hide_emoji_picker_summary_on">Emoji picker is hidden</string>
|
<string name="revanced_hide_emoji_picker_summary_on">Emoji picker is hidden</string>
|
||||||
<string name="revanced_hide_emoji_picker_title">Hide emoji picker</string>
|
<string name="revanced_hide_emoji_picker_title">Hide emoji picker</string>
|
||||||
@ -345,6 +342,9 @@ Only available to some users who can use the speed overlay"</string>
|
|||||||
<string name="revanced_hide_gray_separator_summary_off">Gray separators are shown</string>
|
<string name="revanced_hide_gray_separator_summary_off">Gray separators are shown</string>
|
||||||
<string name="revanced_hide_gray_separator_summary_on">Gray separators are hidden</string>
|
<string name="revanced_hide_gray_separator_summary_on">Gray separators are hidden</string>
|
||||||
<string name="revanced_hide_gray_separator_title">Hide gray separator</string>
|
<string name="revanced_hide_gray_separator_title">Hide gray separator</string>
|
||||||
|
<string name="revanced_hide_handle_summary_off">Handle is shown</string>
|
||||||
|
<string name="revanced_hide_handle_summary_on">Handle is hidden</string>
|
||||||
|
<string name="revanced_hide_handle_title">Hide handle</string>
|
||||||
<string name="revanced_hide_home_button_summary_off">Home button is shown</string>
|
<string name="revanced_hide_home_button_summary_off">Home button is shown</string>
|
||||||
<string name="revanced_hide_home_button_summary_on">Home button is hidden</string>
|
<string name="revanced_hide_home_button_summary_on">Home button is hidden</string>
|
||||||
<string name="revanced_hide_home_button_title">Hide home button</string>
|
<string name="revanced_hide_home_button_title">Hide home button</string>
|
||||||
|
@ -179,12 +179,12 @@
|
|||||||
<!-- SETTINGS: HIDE_CROWDFUNDING_BOX
|
<!-- SETTINGS: HIDE_CROWDFUNDING_BOX
|
||||||
<SwitchPreference android:title="@string/revanced_hide_crowdfunding_box_title" android:key="revanced_hide_crowdfunding_box" android:defaultValue="true" android:summaryOn="@string/revanced_hide_crowdfunding_box_summary_on" android:summaryOff="@string/revanced_hide_crowdfunding_box_summary_off" />SETTINGS: HIDE_CROWDFUNDING_BOX -->
|
<SwitchPreference android:title="@string/revanced_hide_crowdfunding_box_title" android:key="revanced_hide_crowdfunding_box" android:defaultValue="true" android:summaryOn="@string/revanced_hide_crowdfunding_box_summary_on" android:summaryOff="@string/revanced_hide_crowdfunding_box_summary_off" />SETTINGS: HIDE_CROWDFUNDING_BOX -->
|
||||||
|
|
||||||
<!-- SETTINGS: HIDE_EMAIL_ADDRESS
|
|
||||||
<SwitchPreference android:title="@string/revanced_hide_email_address_title" android:key="revanced_hide_email_address" android:defaultValue="true" android:summaryOn="@string/revanced_hide_email_address_summary_on" android:summaryOff="@string/revanced_hide_email_address_summary_off" />SETTINGS: HIDE_EMAIL_ADDRESS -->
|
|
||||||
|
|
||||||
<!-- SETTINGS: HIDE_FLOATING_MICROPHONE
|
<!-- SETTINGS: HIDE_FLOATING_MICROPHONE
|
||||||
<SwitchPreference android:title="@string/revanced_hide_floating_microphone_title" android:key="revanced_hide_floating_microphone" android:defaultValue="true" android:summaryOn="@string/revanced_hide_floating_microphone_summary_on" android:summaryOff="@string/revanced_hide_floating_microphone_summary_off" />SETTINGS: HIDE_FLOATING_MICROPHONE -->
|
<SwitchPreference android:title="@string/revanced_hide_floating_microphone_title" android:key="revanced_hide_floating_microphone" android:defaultValue="true" android:summaryOn="@string/revanced_hide_floating_microphone_summary_on" android:summaryOff="@string/revanced_hide_floating_microphone_summary_off" />SETTINGS: HIDE_FLOATING_MICROPHONE -->
|
||||||
|
|
||||||
|
<!-- SETTINGS: HIDE_HANDLE
|
||||||
|
<SwitchPreference android:title="@string/revanced_hide_handle_title" android:key="revanced_hide_handle" android:defaultValue="true" android:summaryOn="@string/revanced_hide_handle_summary_on" android:summaryOff="@string/revanced_hide_handle_summary_off" />SETTINGS: HIDE_HANDLE -->
|
||||||
|
|
||||||
<!-- SETTINGS: HIDE_LATEST_VIDEOS_BUTTON
|
<!-- SETTINGS: HIDE_LATEST_VIDEOS_BUTTON
|
||||||
<SwitchPreference android:title="@string/revanced_hide_latest_videos_button_title" android:key="revanced_hide_latest_videos_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_latest_videos_button_summary_on" android:summaryOff="@string/revanced_hide_latest_videos_button_summary_off" />SETTINGS: HIDE_LATEST_VIDEOS_BUTTON -->
|
<SwitchPreference android:title="@string/revanced_hide_latest_videos_button_title" android:key="revanced_hide_latest_videos_button" android:defaultValue="true" android:summaryOn="@string/revanced_hide_latest_videos_button_summary_on" android:summaryOff="@string/revanced_hide_latest_videos_button_summary_off" />SETTINGS: HIDE_LATEST_VIDEOS_BUTTON -->
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user