UX: remove in:unpinned filter from advanced search page. (#9911)

This commit is contained in:
Vinoth Kannan
2020-05-29 00:47:28 +05:30
committed by GitHub
parent 74d28a43d1
commit ce1491e830
5 changed files with 2 additions and 19 deletions

View File

@ -354,14 +354,6 @@ class Search
posts.where("topics.pinned_at IS NOT NULL")
end
advanced_filter(/^in:unpinned$/) do |posts|
if @guardian.user
posts.where("topics.pinned_at IS NOT NULL AND topics.id IN (
SELECT topic_id FROM topic_users WHERE user_id = ? AND cleared_pinned_at IS NOT NULL
)", @guardian.user.id)
end
end
advanced_filter(/^in:wiki$/) do |posts, match|
posts.where(wiki: true)
end