New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: Show dismiss posts/topics buttons on category filtered lists #2908
FEATURE: Show dismiss posts/topics buttons on category filtered lists #2908
Conversation
You've signed the CLA, cpradio. Thank you! This pull request is ready for review. |
Oh nice one cpradio!
|
Thank you :) |
Thanks! I left a couple of small comments. |
… snake case for category_id
Comments applied. Thanks! |
topic_ids = TopicQuery.unread_filter(tq.joined_topic_user).listable_topics.where('category_id = ?', params[:category_id]).pluck(:id) | ||
else | ||
topic_ids = TopicQuery.unread_filter(tq.joined_topic_user).listable_topics.pluck(:id) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if params[:category_id]
+ topic_ids = TopicQuery.unread_filter(tq.joined_topic_user).listable_topics.where('category_id = ?', params[:category_id]).pluck(:id)
+ else
+ topic_ids = TopicQuery.unread_filter(tq.joined_topic_user).listable_topics.pluck(:id)
+ end
topics = TopicQuery.unread_filter(tq.joined_topic_user).listable_topics
topics = topics.where('category_id = ?', params[:category_id]) if params[:category_id]
topic_ids = topics.pluck(:id)
this change looks good, lets apply my comment and get it merged |
Thanks @SamSaffron! As usual, you found a way to make my logic much cleaner. 👍 |
looks good, thanks! |
…gory FEATURE: Show dismiss posts/topics buttons on category filtered lists
FEATURE: Add Dismiss Posts/Topics button to Category filtered Unread View