mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-09-11 16:56:30 +02:00
feat: hide-shorts-button
patch
This commit is contained in:
parent
f80db4f7c8
commit
145b3c063a
@ -178,6 +178,19 @@ public class XAdRemover {
|
||||
}
|
||||
}
|
||||
|
||||
public static void hideShortsButton(View view) {
|
||||
if (XGlobals.lastPivotTab != null && XGlobals.lastPivotTab.name() == "TAB_SHORTS") {
|
||||
if (BooleanPreferences.isShortsButtonHidden()) {
|
||||
if (XGlobals.debug) {
|
||||
Log.d("XAdRemover", "Shorts button: shown");
|
||||
}
|
||||
view.setVisibility(View.GONE);
|
||||
} else if (XGlobals.debug) {
|
||||
Log.d("XAdRemover", "Shorts button: hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void inspectComponentHost(Object item) {
|
||||
StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||
if (stackTraceElements.length <= 3) {
|
||||
|
@ -152,6 +152,7 @@ public class XGlobals {
|
||||
public static Integer maxBuffer = 120000;
|
||||
public static Integer playbackMS = 2500;
|
||||
public static Integer reBuffer = 5000;
|
||||
public static Enum lastPivotTab;
|
||||
|
||||
public static void ReadSettings() {
|
||||
Context context;
|
||||
|
@ -19,4 +19,8 @@ public class BooleanPreferences {
|
||||
public static boolean isCreateButtonHidden() {
|
||||
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "xfile_create_button_hidden", true);
|
||||
}
|
||||
|
||||
public static boolean isShortsButtonHidden() {
|
||||
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "xfile_shorts_button_hidden", true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user