mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: filter reply
Closes #118 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -67,7 +67,8 @@ class RecommendFilter {
|
||||
if (exemptFilterForFollowed && isFollowed == true) {
|
||||
return false;
|
||||
}
|
||||
if (banWords.isNotEmpty && RegExp(banWords).hasMatch(title)) {
|
||||
if (banWords.isNotEmpty &&
|
||||
RegExp(banWords, caseSensitive: false).hasMatch(title)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -180,6 +180,9 @@ class GStorage {
|
||||
static String get banWordForRecommend =>
|
||||
setting.get(SettingBoxKey.banWordForRecommend, defaultValue: '');
|
||||
|
||||
static String get banWordForReply =>
|
||||
setting.get(SettingBoxKey.banWordForReply, defaultValue: '');
|
||||
|
||||
static int get minLikeRatioForRecommend =>
|
||||
setting.get(SettingBoxKey.minLikeRatioForRecommend, defaultValue: 0);
|
||||
|
||||
@@ -517,6 +520,7 @@ class SettingBoxKey {
|
||||
continuePlayingPart = 'continuePlayingPart',
|
||||
cdnSpeedTest = 'cdnSpeedTest',
|
||||
horizontalPreview = 'horizontalPreview',
|
||||
banWordForReply = 'banWordForReply',
|
||||
|
||||
// Sponsor Block
|
||||
enableSponsorBlock = 'enableSponsorBlock',
|
||||
|
||||
Reference in New Issue
Block a user