Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(YouTube Music - Player components): Hide Audio / Video toggle s…
Browse files Browse the repository at this point in the history
…etting not working in landscape mode
  • Loading branch information
anddea committed Oct 15, 2024
1 parent efbb6fe commit b6a41ab
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.view.View;
import android.view.ViewGroup;

import java.util.Arrays;

Expand Down Expand Up @@ -129,13 +128,11 @@ public static int enableZenMode(int originalColor) {
return originalColor;
}

public static void hideAudioVideoSwitchToggle(View view) {
if (!Settings.HIDE_AUDIO_VIDEO_SWITCH_TOGGLE.get())
return;

if (view.getParent() instanceof ViewGroup viewGroup) {
viewGroup.setVisibility(View.INVISIBLE);
public static void hideAudioVideoSwitchToggle(View view, int originalVisibility) {
if (Settings.HIDE_AUDIO_VIDEO_SWITCH_TOGGLE.get()) {
originalVisibility = View.GONE;
}
view.setVisibility(originalVisibility);
}

public static void hideDoubleTapOverlayFilter(View view) {
Expand Down

0 comments on commit b6a41ab

Please sign in to comment.