mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-27 10:04:45 +01:00
Minor fix to comment filters
This commit is contained in:
parent
0b1171c5b2
commit
ff3ccca3eb
@ -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("")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user