mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
feat(YouTube Music - Hide action bar components): Add Change action bar position
setting (YouTube Music 7.25.53+)
This commit is contained in:
@ -25,6 +25,7 @@ import app.revanced.patches.shared.litho.addLithoFilter
|
||||
import app.revanced.patches.shared.litho.lithoFilterPatch
|
||||
import app.revanced.patches.shared.textcomponent.hookSpannableString
|
||||
import app.revanced.patches.shared.textcomponent.textComponentPatch
|
||||
import app.revanced.util.fingerprint.injectLiteralInstructionBooleanCall
|
||||
import app.revanced.util.fingerprint.matchOrThrow
|
||||
import app.revanced.util.fingerprint.methodOrThrow
|
||||
import app.revanced.util.getReference
|
||||
@ -77,6 +78,19 @@ val actionBarComponentsPatch = bytecodePatch(
|
||||
nop
|
||||
"""
|
||||
)
|
||||
|
||||
if (is_7_25_or_greater) {
|
||||
actionBarPositionFeatureFlagFingerprint.injectLiteralInstructionBooleanCall(
|
||||
ACTION_BAR_POSITION_FEATURE_FLAG,
|
||||
"$ACTIONBAR_CLASS_DESCRIPTOR->changeActionBarPosition(Z)Z"
|
||||
)
|
||||
|
||||
addSwitchPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_change_action_bar_position",
|
||||
"false"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_7_25_or_greater) {
|
||||
|
@ -22,6 +22,15 @@ internal val actionBarComponentFingerprint = legacyFingerprint(
|
||||
literals = listOf(99180L),
|
||||
)
|
||||
|
||||
internal const val ACTION_BAR_POSITION_FEATURE_FLAG = 45658717L
|
||||
|
||||
internal val actionBarPositionFeatureFlagFingerprint = legacyFingerprint(
|
||||
name = "actionBarPositionFeatureFlagFingerprint",
|
||||
returnType = "Z",
|
||||
parameters = emptyList(),
|
||||
literals = listOf(ACTION_BAR_POSITION_FEATURE_FLAG)
|
||||
)
|
||||
|
||||
internal val likeDislikeContainerFingerprint = legacyFingerprint(
|
||||
name = "likeDislikeContainerFingerprint",
|
||||
returnType = "V",
|
||||
|
Reference in New Issue
Block a user