mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-06-10 23:27:54 +02:00
fix: remove obsolete hook
This commit is contained in:
parent
6908029c77
commit
1adcfccdfb
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user