Skip to content

Keep rendering comments until first non-stickied mod post is found #26

@iampueroo

Description

@iampueroo

Summary

Upon the release of v1.3. rComments will automatically load the second comment if the first is a stickied/pinned moderator comment. There is an edge case when there are multiple pinned moderator comments. For example, see this post on /r/DrunkOrAKid.

Potential Solution

The two solutions are, in order of simplicity
1. Recursively call the logic that identifies if a comment is a pinned moderator comment and executes the fetch of the next one. In this solution, we should have a limit of # of AJAX requests to fetch in a row, as well as be careful that the logic ONLY happens when the first comment is triggered from the subreddit page (as opposed to the "Next Reply" button).
2. Refactor the fetching/state logic so that we fetch n comments per request (for example, n=10) but the UI only renders the first m (where m <= n depending on # of pinned mod comments). This has been done, so this is quite easy now

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions