This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
fix(YouTube - Restore old video quality menu): Do not show error toast if using an old version of YT #640
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On first launch of Android 8.0 (and maybe some slightly newer versions as well), the playback speed and quality menus use whatever is pre-baked into the apk. It's only after a few app restarts does it start using the newer code paths the old quality and custom speed patches expect.
If the speed or quality menu is opened during these initial launches, the menus show the unpatched behavior but also throw exception toasts.
Rather than fix the patch to work for this temporary situation, instead this PR makes the patches more cautious and fallbacks on using the old menus (as if the patches were disabled). After 1 or more app launches the new flyouts are used and the patches then work as expected.