-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Description
Hi, I'm struggling to iterate down a comment tree. Based on what I've seen of the RedditSharp code and the Reddit API, I think I should get back a More
object on comments that on Reddit show with a Continue this thread
link. I'm not seeing this and I'm not sure if it's not implemented or I'm doing something wrong...
The post I'm looking at specifically in trying to solve this is this one, specifically this comment thread. And my current implementation looks something like this, where I've retrieved the above linked post, and I'm traversing down the above comment thread.
Post post = GetPost(xyz);
List<Comment> authorComments = GetAllComments(post); // Gets top level comments by the post author
while (authorComments.Count > 0)
{
// Grab highest voted comment
Comment topComment = authorComments.OrderByDescending(comment => comment.Upvotes).First();
// Add contents to thread text
threadContents += Environment.NewLine + Environment.NewLine + topComment.Body;
if (topComment.More != null)
{
Console.WriteLine("MORE!"); // This is never hit
// Go fetch the 'more' child comments (here lies the problem) + assign to authorComments
} else {
// Otherwise, get the child comments by the same author
authorComments = topComment.Comments.Where(authorCommentsFilter).ToList();
}
}