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

Commit

Permalink
fix: Check index of pattern in string instead of the other way around
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Mar 26, 2024
1 parent 3329285 commit e3ba343
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package app.revanced.integrations.youtube.patches.components;

import android.os.Build;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
Expand All @@ -15,7 +14,6 @@
import java.util.function.Consumer;

import app.revanced.integrations.shared.Logger;
import app.revanced.integrations.shared.Utils;
import app.revanced.integrations.shared.settings.BooleanSetting;
import app.revanced.integrations.shared.settings.BaseSettings;
import app.revanced.integrations.youtube.ByteTrieSearch;
Expand Down Expand Up @@ -124,7 +122,7 @@ public FilterGroupResult check(final String string) {
if (isEnabled()) {
for (String pattern : filters) {
if (!string.isEmpty()) {
final int indexOf = pattern.indexOf(string);
final int indexOf = string.indexOf(pattern);
if (indexOf >= 0) {
matchedIndex = indexOf;
matchedLength = pattern.length();
Expand Down

0 comments on commit e3ba343

Please sign in to comment.