Skip to content

Commit

Permalink
fix(YouTube - Old video quality menu): Fix toast error on tablet devi…
Browse files Browse the repository at this point in the history
…ces (#500)
  • Loading branch information
LisoUseInAIKyrios committed Oct 15, 2023
1 parent 12e663c commit d3eba27
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -27,10 +27,13 @@ public static void onFlyoutMenuCreate(RecyclerView recyclerView) {
// 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);
Expand Down

0 comments on commit d3eba27

Please sign in to comment.