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

Commit

Permalink
feat(YouTube Music): Integrate Hide double tap overlay filter patch…
Browse files Browse the repository at this point in the history
… into the `Player components` patch
  • Loading branch information
inotia00 authored and Francesco146 committed Jun 29, 2024
1 parent ccc20d8 commit 7628ed1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package app.revanced.integrations.music.patches.player;

import static app.revanced.integrations.shared.utils.Utils.hideViewByRemovingFromParentUnderCondition;
import static app.revanced.integrations.shared.utils.Utils.hideViewUnderCondition;

import android.annotation.SuppressLint;
Expand Down Expand Up @@ -127,6 +128,10 @@ public static void hideAudioVideoSwitchToggle(View view) {
}
}

public static void hideDoubleTapOverlayFilter(View view) {
hideViewByRemovingFromParentUnderCondition(Settings.HIDE_DOUBLE_TAP_OVERLAY_FILTER, view);
}

public static int hideFullscreenShareButton(int original) {
return Settings.HIDE_FULLSCREEN_SHARE_BUTTON.get() ? 0 : original;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_AUDIO_VIDEO_SWITCH_TOGGLE = new BooleanSetting("revanced_hide_audio_video_switch_toggle", FALSE, true);
public static final BooleanSetting HIDE_COMMENT_CHANNEL_GUIDELINES = new BooleanSetting("revanced_hide_comment_channel_guidelines", TRUE);
public static final BooleanSetting HIDE_COMMENT_TIMESTAMP_AND_EMOJI_BUTTONS = new BooleanSetting("revanced_hide_comment_timestamp_and_emoji_buttons", FALSE);
public static final BooleanSetting HIDE_DOUBLE_TAP_OVERLAY_FILTER = new BooleanSetting("revanced_hide_double_tap_overlay_filter", FALSE, true);
public static final BooleanSetting HIDE_FULLSCREEN_SHARE_BUTTON = new BooleanSetting("revanced_hide_fullscreen_share_button", FALSE, true);
public static final BooleanSetting REMEMBER_REPEAT_SATE = new BooleanSetting("revanced_remember_repeat_state", TRUE);
public static final BooleanSetting REMEMBER_SHUFFLE_SATE = new BooleanSetting("revanced_remember_shuffle_state", TRUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public static void hideViewByRemovingFromParentUnderCondition(BooleanSetting con

public static void hideViewByRemovingFromParentUnderCondition(boolean condition, View view) {
if (!condition) return;
if (view == null) return;
if (!(view.getParent() instanceof ViewGroup viewGroup))
return;

Expand Down

0 comments on commit 7628ed1

Please sign in to comment.