mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-11 21:17:47 +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.
|
// Check if the current view is the quality menu.
|
||||||
if (VideoQualityMenuFilterPatch.isVideoQualityMenuVisible) {
|
if (VideoQualityMenuFilterPatch.isVideoQualityMenuVisible) {
|
||||||
VideoQualityMenuFilterPatch.isVideoQualityMenuVisible = false;
|
VideoQualityMenuFilterPatch.isVideoQualityMenuVisible = false;
|
||||||
((ViewGroup) recyclerView.getParent().getParent().getParent()).setVisibility(View.GONE);
|
|
||||||
|
|
||||||
// Click the "Advanced" quality menu to show the "old" quality menu.
|
((ViewGroup) recyclerView.getParent().getParent().getParent()).setVisibility(View.GONE);
|
||||||
((ViewGroup) recyclerView.getChildAt(0)).getChildAt(3).performClick();
|
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) {
|
} catch (Exception ex) {
|
||||||
LogHelper.printException(() -> "onFlyoutMenuCreate failure", ex);
|
LogHelper.printException(() -> "onFlyoutMenuCreate failure", ex);
|
||||||
|
Loading…
Reference in New Issue
Block a user