mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 13:29:50 +02:00
Minor fix to comment filters
This commit is contained in:
@@ -52,10 +52,11 @@ public class CommentFilter implements Parcelable {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static boolean isCommentAllowed(Comment comment, CommentFilter commentFilter) {
|
public static boolean isCommentAllowed(Comment comment, CommentFilter commentFilter) {
|
||||||
if (commentFilter.maxVote > 0 && comment.getVoteType() + comment.getScore() > commentFilter.maxVote) {
|
int score = comment.getScore() + comment.getVoteType();
|
||||||
|
if (commentFilter.maxVote >= 0 && score > commentFilter.maxVote) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (commentFilter.minVote > 0 && comment.getVoteType() + comment.getScore() < commentFilter.minVote) {
|
if (commentFilter.minVote >= 0 && score < commentFilter.minVote) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (commentFilter.excludeStrings != null && !commentFilter.excludeStrings.equals("")) {
|
if (commentFilter.excludeStrings != null && !commentFilter.excludeStrings.equals("")) {
|
||||||
|
Reference in New Issue
Block a user