fix(YouTube): Advanced video quality menu does not work
Co-authored-by: LisoUseInAIKyrios <118716522+lisouseinaikyrios@users.noreply.github.com>
This commit is contained in:
parent
09bce22aeb
commit
f063cf69bd
2 changed files with 15 additions and 0 deletions
|
|
@ -26,6 +26,11 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
|
||||
internal val BytecodePatchContext.newAdvancedQualityMenuStyleFlyoutMethodMatch by composingFirstMethod {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
instructions(45712556L())
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.currentVideoFormatToStringMethod by gettingFirstImmutableMethodDeclaratively(
|
||||
"currentVideoFormat="
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import app.revanced.patcher.patch.bytecodePatch
|
|||
import app.revanced.patches.shared.misc.settings.preference.BasePreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.PreferenceCategory
|
||||
import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference.Sorting
|
||||
import app.revanced.patches.youtube.misc.playservice.is_20_40_or_greater
|
||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||
import app.revanced.util.insertLiteralOverride
|
||||
|
||||
/**
|
||||
* Video quality settings. Used to organize all speed related settings together.
|
||||
|
|
@ -46,5 +48,13 @@ val videoQualityPatch = bytecodePatch(
|
|||
preferences = settingsMenuVideoQualityGroup,
|
||||
),
|
||||
)
|
||||
|
||||
if (is_20_40_or_greater) {
|
||||
// Flag breaks opening advanced quality menu.
|
||||
// Alternatively can be fixed by using a delay when simulating the UI click.
|
||||
newAdvancedQualityMenuStyleFlyoutMethodMatch.let {
|
||||
it.method.insertLiteralOverride(it[0], false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue