DEV: Refactor `TopicView#filter_posts` for readability. (PR #14606)

GitHub

Thank you @CvX