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

Commit

Permalink
remove redundant switch
Browse files Browse the repository at this point in the history
  • Loading branch information
johnconner122 committed Aug 2, 2023
1 parent 6bc7f90 commit e939e28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

public class PlayerOverlayPatch {
private static final boolean HIDE_PLAYER_OVERLAY = SettingsEnum.HIDE_PLAYER_OVERLAY.getBoolean();
private static final boolean USE_CUSTOM_OVERLAY_OPACITY = SettingsEnum.CHANGE_PLAYER_OVERLAY_OPACITY.getBoolean();
private static final int DEFAULT_OPACITY = 100;
private static final int DEFAULT_OPACITY = SettingsEnum.CHANGE_PLAYER_OVERLAY_OPACITY_VALUE.getInt();
private static int opacity = DEFAULT_OPACITY;

static {
if (USE_CUSTOM_OVERLAY_OPACITY)
if (!HIDE_PLAYER_OVERLAY)
loadCustomOpacityValue();
}

Expand All @@ -23,7 +22,7 @@ public static void hidePlayerOverlay(ImageView imageView) {
}

public static void changePlayerOverlay(ImageView imageView) {
if (!USE_CUSTOM_OVERLAY_OPACITY || HIDE_PLAYER_OVERLAY) return;
if (HIDE_PLAYER_OVERLAY) return;

imageView.setImageAlpha(mapOpacity(opacity));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ public enum SettingsEnum {
HIDE_ACTION_BUTTONS("revanced_hide_action_buttons", BOOLEAN, FALSE),

// Layout
CHANGE_PLAYER_OVERLAY_OPACITY("revanced_player_overlay_opacity", BOOLEAN, FALSE, true),
CHANGE_PLAYER_OVERLAY_OPACITY_VALUE("revanced_player_overlay_opacity_value", INTEGER, 255, true, parents(CHANGE_PLAYER_OVERLAY_OPACITY)),
CHANGE_PLAYER_OVERLAY_OPACITY_VALUE("revanced_player_overlay_opacity_value", INTEGER, 100, true),
DISABLE_RESUMING_SHORTS_PLAYER("revanced_disable_resuming_shorts_player", BOOLEAN, FALSE),
HIDE_ALBUM_CARDS("revanced_hide_album_cards", BOOLEAN, FALSE, true),
HIDE_ARTIST_CARDS("revanced_hide_artist_cards", BOOLEAN, FALSE),
Expand Down

0 comments on commit e939e28

Please sign in to comment.