@@ -33,7 +33,7 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
3333 def list_article_comments ( thread , article_id , filters , mode , user \\ nil )
3434
3535 def list_article_comments ( thread , article_id , filters , :timeline , user ) do
36- where_query = dynamic ( [ c ] , not c . is_folded and not c . is_reported and not c . is_pinned )
36+ where_query = dynamic ( [ c ] , not c . is_folded and not c . is_pinned )
3737 do_list_article_comment ( thread , article_id , filters , where_query , user )
3838 end
3939
@@ -44,26 +44,19 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
4444 where_query =
4545 dynamic (
4646 [ c ] ,
47- is_nil ( c . reply_to_id ) and not c . is_folded and not c . is_reported and not c . is_pinned
47+ is_nil ( c . reply_to_id ) and not c . is_folded and not c . is_pinned
4848 )
4949
5050 do_list_article_comment ( thread , article_id , filters , where_query , user )
5151 end
5252
5353 def list_folded_article_comments ( thread , article_id , filters ) do
54- where_query = dynamic ( [ c ] , c . is_folded and not c . is_reported and not c . is_pinned )
54+ where_query = dynamic ( [ c ] , c . is_folded and not c . is_pinned )
5555 do_list_article_comment ( thread , article_id , filters , where_query , nil )
5656 end
5757
5858 def list_folded_article_comments ( thread , article_id , filters , user ) do
59- where_query = dynamic ( [ c ] , c . is_folded and not c . is_reported and not c . is_pinned )
60- do_list_article_comment ( thread , article_id , filters , where_query , user )
61- end
62-
63- def list_reported_article_comments ( thread , article_id , filters , user \\ nil )
64-
65- def list_reported_article_comments ( thread , article_id , filters , user ) do
66- where_query = dynamic ( [ c ] , c . is_reported )
59+ where_query = dynamic ( [ c ] , c . is_folded and not c . is_pinned )
6760 do_list_article_comment ( thread , article_id , filters , where_query , user )
6861 end
6962
@@ -227,8 +220,7 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
227220 % { page: page , size: size } = filters
228221 query = from ( c in ArticleComment , preload: [ reply_to: :author ] )
229222
230- where_query =
231- dynamic ( [ c ] , not c . is_reported and not c . is_folded and c . reply_to_id == ^ comment_id )
223+ where_query = dynamic ( [ c ] , not c . is_folded and c . reply_to_id == ^ comment_id )
232224
233225 query
234226 |> where ( ^ where_query )
0 commit comments