feat(YouTube - Navigation bar components): Revert - 'Separate Enable translucent navigation bar setting into Disable light translucent bar and Disable dark translucent bar settings'

This commit is contained in:
inotia00
2024-12-31 21:39:38 +09:00
parent 6f0958b328
commit a152588fdd
7 changed files with 35 additions and 0 deletions

View File

@ -73,3 +73,10 @@ internal val setEnumMapFingerprint = legacyFingerprint(
name = "setEnumMapFingerprint",
literals = listOf(ytFillBell),
)
internal const val TRANSLUCENT_NAVIGATION_BAR_FEATURE_FLAG = 45630927L
internal val translucentNavigationBarFingerprint = legacyFingerprint(
name = "translucentNavigationBarFingerprint",
literals = listOf(TRANSLUCENT_NAVIGATION_BAR_FEATURE_FLAG),
)

View File

@ -82,6 +82,19 @@ val navigationBarComponentsPatch = bytecodePatch(
"SETTINGS: HIDE_NAVIGATION_COMPONENTS"
)
// region patch for enable translucent navigation bar
if (is_19_25_or_greater) {
translucentNavigationBarFingerprint.injectLiteralInstructionBooleanCall(
TRANSLUCENT_NAVIGATION_BAR_FEATURE_FLAG,
"$GENERAL_CLASS_DESCRIPTOR->enableTranslucentNavigationBar()Z"
)
settingArray += "SETTINGS: TRANSLUCENT_NAVIGATION_BAR"
}
// endregion
// region patch for enable narrow navigation buttons
arrayOf(