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

Commit 867645e

Browse files
OxrxLoSumAtrIX
andauthored
feat(youtube): hide-captions-button patch (#175)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
1 parent 52a2073 commit 867645e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package app.revanced.integrations.patches;
2+
3+
import android.widget.ImageView;
4+
5+
import app.revanced.integrations.settings.SettingsEnum;
6+
import app.revanced.integrations.utils.LogHelper;
7+
8+
public class HideCaptionsButtonPatch {
9+
//Used by app.revanced.patches.youtube.layout.hidecaptionsbutton.patch.HideCaptionsButtonPatch
10+
public static void hideCaptionsButton(ImageView imageView) {
11+
imageView.setVisibility(SettingsEnum.HIDE_CAPTIONS_BUTTON.getBoolean() ? ImageView.GONE : ImageView.VISIBLE);
12+
}
13+
}

app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public enum SettingsEnum {
7070
HIDE_TIME_AND_SEEKBAR("revanced_hide_time_and_seekbar", false, ReturnType.BOOLEAN),
7171
HIDE_EMAIL_ADDRESS("revanced_hide_email_address", false, ReturnType.BOOLEAN),
7272
DISABLE_STARTUP_SHORTS_PLAYER("revanced_startup_shorts_player_enabled", false, ReturnType.BOOLEAN),
73+
HIDE_CAPTIONS_BUTTON("revanced_hide_captions_button", false, ReturnType.BOOLEAN),
7374
HIDE_MIX_PLAYLISTS("revanced_mix_playlists_hidden", false, ReturnType.BOOLEAN, true),
7475

7576
// Misc. Settings

0 commit comments

Comments
 (0)