mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-08-30 11:05:15 +02:00
feat: block rule of type CustomBlockRule
This commit is contained in:
parent
09c7605f1f
commit
571cf12dca
@ -52,7 +52,7 @@ final class BlockRule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final SettingsEnum setting;
|
protected final SettingsEnum setting;
|
||||||
private final String[] blocks;
|
private final String[] blocks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +75,19 @@ final class BlockRule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final class CustomBlockRule extends BlockRule {
|
||||||
|
/**
|
||||||
|
* Initialize a new rule for components.
|
||||||
|
*
|
||||||
|
* @param setting The setting which controls the blocking of the components.
|
||||||
|
* @param filter The setting which contains the list of component names.
|
||||||
|
*/
|
||||||
|
public CustomBlockRule(final SettingsEnum setting, final SettingsEnum filter) {
|
||||||
|
super(setting, filter.getString().split(","));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
abstract class Filter {
|
abstract class Filter {
|
||||||
final LithoBlockRegister pathRegister = new LithoBlockRegister();
|
final LithoBlockRegister pathRegister = new LithoBlockRegister();
|
||||||
final LithoBlockRegister identifierRegister = new LithoBlockRegister();
|
final LithoBlockRegister identifierRegister = new LithoBlockRegister();
|
||||||
|
Loading…
Reference in New Issue
Block a user