Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
fix(YouTube - Hide feed components): Remove MINIMUM_KEYWORD_LENGTH
Browse files Browse the repository at this point in the history
  • Loading branch information
anddea committed Jul 3, 2024
1 parent 2c5360c commit 4e4c104
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
@SuppressWarnings("unused")
public final class KeywordContentFilter extends Filter {

/**
* Minimum keyword/phrase length to prevent excessively broad content filtering.
*/
private static final int MINIMUM_KEYWORD_LENGTH = 3;

/**
* Strings found in the buffer for every video.
* Full strings should be specified, as they are compared using {@link String#contains(CharSequence)}.
Expand Down Expand Up @@ -235,12 +230,6 @@ private synchronized void parseKeywords() { // Must be synchronized since Litho
phrase = phrase.stripTrailing();
if (phrase.isBlank()) continue;

if (phrase.length() < MINIMUM_KEYWORD_LENGTH) {
// Do not reset the setting. Keep the invalid keywords so the user can fix the mistake.
Utils.showToastLong(str("revanced_hide_keyword_toast_invalid_keyword", phrase, MINIMUM_KEYWORD_LENGTH));
continue;
}

// Add common casing that might appear.
//
// This could be simplified by adding case-insensitive search to the prefix search,
Expand Down

0 comments on commit 4e4c104

Please sign in to comment.