mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-01 00:02:55 +01:00
fix(YouTube - Old video quality menu): Fix toast error on tablet devices (#500)
This commit is contained in:
parent
12e663c548
commit
d3eba27c90
@ -27,10 +27,13 @@ public final class OldVideoQualityMenuPatch {
|
||||
// Check if the current view is the quality menu.
|
||||
if (VideoQualityMenuFilterPatch.isVideoQualityMenuVisible) {
|
||||
VideoQualityMenuFilterPatch.isVideoQualityMenuVisible = false;
|
||||
((ViewGroup) recyclerView.getParent().getParent().getParent()).setVisibility(View.GONE);
|
||||
|
||||
// Click the "Advanced" quality menu to show the "old" quality menu.
|
||||
((ViewGroup) recyclerView.getChildAt(0)).getChildAt(3).performClick();
|
||||
((ViewGroup) recyclerView.getParent().getParent().getParent()).setVisibility(View.GONE);
|
||||
View advancedQualityView = ((ViewGroup) recyclerView.getChildAt(0)).getChildAt(3);
|
||||
if (advancedQualityView != null) {
|
||||
// Click the "Advanced" quality menu to show the "old" quality menu.
|
||||
advancedQualityView.performClick();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LogHelper.printException(() -> "onFlyoutMenuCreate failure", ex);
|
||||
|
Loading…
Reference in New Issue
Block a user