Skip to content

Commit

Permalink
feat(YouTube - Navigation buttons): Add option to hide navigation but…
Browse files Browse the repository at this point in the history
…ton labels (ReVanced#635)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
  • Loading branch information
MarcaDian and oSumAtrIX committed May 18, 2024
1 parent 78cf116 commit 6bd0ac2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package app.revanced.integrations.youtube.patches;

import static app.revanced.integrations.shared.Utils.hideViewUnderCondition;
import static app.revanced.integrations.youtube.shared.NavigationBar.NavigationButton;

import android.view.View;

import java.util.EnumMap;
import java.util.Map;

import app.revanced.integrations.shared.Logger;
import android.widget.TextView;
import app.revanced.integrations.youtube.settings.Settings;

@SuppressWarnings("unused")
Expand Down Expand Up @@ -40,4 +41,11 @@ public static void navigationTabCreated(NavigationButton button, View tabView) {
tabView.setVisibility(View.GONE);
}
}

/**
* Injection point.
*/
public static void hideNavigationButtonLabels(TextView navigationLabelsView) {
hideViewUnderCondition(Settings.HIDE_NAVIGATION_BUTTON_LABELS, navigationLabelsView);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public class Settings extends BaseSettings {
public static final BooleanSetting HIDE_CREATE_BUTTON = new BooleanSetting("revanced_hide_create_button", TRUE, true);
public static final BooleanSetting HIDE_SHORTS_BUTTON = new BooleanSetting("revanced_hide_shorts_button", TRUE, true);
public static final BooleanSetting HIDE_SUBSCRIPTIONS_BUTTON = new BooleanSetting("revanced_hide_subscriptions_button", FALSE, true);
public static final BooleanSetting HIDE_NAVIGATION_BUTTON_LABELS = new BooleanSetting("revanced_hide_navigation_button_labels", FALSE, true);
public static final BooleanSetting SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON = new BooleanSetting("revanced_switch_create_with_notifications_button", TRUE, true);

// Shorts
Expand Down

0 comments on commit 6bd0ac2

Please sign in to comment.