-
Notifications
You must be signed in to change notification settings - Fork 6
Description
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