From fe51e3b9dd504db1b8d9ac7b2ce6df2217359ecb Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sat, 21 Oct 2023 00:15:13 -0400 Subject: Finish applying comment filter. --- .../infinityforreddit/commentfilter/CommentFilterDao.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterDao.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterDao.java index e6163aa5..68785fb8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterDao.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterDao.java @@ -36,9 +36,9 @@ public interface CommentFilterDao { @Query("SELECT * FROM comment_filter") List getAllCommentFilters(); - @Query("SELECT * FROM comment_filter WHERE comment_filter.name IN " + - "(SELECT comment_filter_usage.name FROM comment_filter_usage WHERE (usage = :usage AND name_of_usage = :nameOfUsage) " + - "OR (usage =:usage AND name_of_usage = '--'))") + @Query("SELECT * FROM comment_filter WHERE (comment_filter.name IN " + + "(SELECT comment_filter_usage.name FROM comment_filter_usage WHERE (usage = :usage AND name_of_usage = :nameOfUsage COLLATE NOCASE)))" + + " OR (comment_filter.name NOT IN (SELECT comment_filter_usage.name FROM comment_filter_usage))") List getValidCommentFilters(int usage, String nameOfUsage); @Transaction -- cgit v1.2.3