mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 04:37:25 +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) {
|
||||
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;
|
||||
}
|
||||
if (commentFilter.minVote > 0 && comment.getVoteType() + comment.getScore() < commentFilter.minVote) {
|
||||
if (commentFilter.minVote >= 0 && score < commentFilter.minVote) {
|
||||
return false;
|
||||
}
|
||||
if (commentFilter.excludeStrings != null && !commentFilter.excludeStrings.equals("")) {
|
||||
|
Loading…
Reference in New Issue
Block a user