fix: remove obsolete hook

This commit is contained in:
johnconner122 2024-03-29 22:05:54 +05:00
parent 6908029c77
commit 1adcfccdfb

View File

@ -1,26 +1,13 @@
package app.revanced.integrations.youtube.patches.components;
import android.view.View;
import androidx.annotation.Nullable;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.youtube.patches.spoof.SpoofAppVersionPatch;
import app.revanced.integrations.youtube.settings.Settings;
import app.revanced.integrations.youtube.shared.NavigationBar;
@SuppressWarnings("unused")
public final class SuggestionsShelfFilter extends Filter {
/**
* When spoofing to app versions less than 18.01.00 and older, the watch history preview bar uses
* the same layout components as the breaking news shelf.
*
* Breaking news does not appear to be present in these older versions anyways.
*/
private static final boolean isSpoofingOldVersionWithHorizontalCardListWatchHistory =
SpoofAppVersionPatch.isSpoofingToLessThan("18.01.00");
public SuggestionsShelfFilter() {
addPathCallbacks(
new StringFilterGroup(
@ -45,14 +32,4 @@ public final class SuggestionsShelfFilter extends Filter {
return false;
}
/**
* Injection point.
*/
public static void hideBreakingNews(View view) {
if (!Settings.HIDE_SUGGESTIONS_SHELF.get()
|| isSpoofingOldVersionWithHorizontalCardListWatchHistory) return;
Utils.hideViewByLayoutParams(view);
}
}