mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
fix(YouTube/Toolbar components): turning on the Hide voice search button
setting makes the margin of the searchbar 0 https://github.com/inotia00/ReVanced_Extended/issues/2270
This commit is contained in:
@ -27,6 +27,7 @@ import app.revanced.patches.youtube.general.toolbar.fingerprints.YouActionBarFin
|
||||
import app.revanced.patches.youtube.utils.castbutton.CastButtonPatch
|
||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL_CLASS_DESCRIPTOR
|
||||
import app.revanced.patches.youtube.utils.integrations.Constants.PATCH_STATUS_CLASS_DESCRIPTOR
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.ActionBarRingoBackground
|
||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.VoiceSearch
|
||||
@ -48,6 +49,7 @@ import app.revanced.util.literalInstructionBooleanHook
|
||||
import app.revanced.util.literalInstructionHook
|
||||
import app.revanced.util.patch.BaseBytecodePatch
|
||||
import app.revanced.util.resultOrThrow
|
||||
import app.revanced.util.updatePatchStatus
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -306,12 +308,14 @@ object ToolBarComponentsPatch : BaseBytecodePatch(
|
||||
|
||||
// region patch for hide voice search button
|
||||
|
||||
if (SettingsPatch.upward1923) {
|
||||
if (SettingsPatch.upward1928) {
|
||||
ImageSearchButtonConfigFingerprint.literalInstructionBooleanHook(
|
||||
45617544,
|
||||
"$GENERAL_CLASS_DESCRIPTOR->hideImageSearchButton(Z)Z"
|
||||
)
|
||||
|
||||
context.updatePatchStatus(PATCH_STATUS_CLASS_DESCRIPTOR, "ImageSearchButton")
|
||||
|
||||
settingArray += "SETTINGS: HIDE_IMAGE_SEARCH_BUTTON"
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,7 @@ object SettingsPatch : BaseResourcePatch(
|
||||
internal var upward1912 = false
|
||||
internal var upward1923 = false
|
||||
internal var upward1925 = false
|
||||
internal var upward1928 = false
|
||||
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
@ -293,6 +294,7 @@ object SettingsPatch : BaseResourcePatch(
|
||||
upward1912 = 241302000 <= playServicesVersion
|
||||
upward1923 = 242402000 <= playServicesVersion
|
||||
upward1925 = 242599000 <= playServicesVersion
|
||||
upward1928 = 242905000 <= playServicesVersion
|
||||
|
||||
break
|
||||
}
|
||||
|
Reference in New Issue
Block a user