Skip to content
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

Good way to get only comments #212

Open
SupremeDeity opened this issue Aug 16, 2021 · 3 comments
Open

Good way to get only comments #212

SupremeDeity opened this issue Aug 16, 2021 · 3 comments

Comments

@SupremeDeity
Copy link
Contributor

Seriously reddit's api is annoying me to the point i just am on the verge of quitting.

Is there a good way to get only Comment List instead of getting mixed up with MoreComment? Or a stream which i can use to only get Comment. I need to use it with a ListView

@bkonyi
Copy link
Member

bkonyi commented Aug 18, 2021

Yeah, I agree it's not super easy to use :-(

You can always get the list of comments with CommentForest.toList() and then do something like this:

final onlyComments = forest.toList().where((e) => e is CommentRef);

@SupremeDeity
Copy link
Contributor Author

What about expanding all MoreComments to Comment?
I have tried using replaceMore() but does it append to Post.submission.comments?. It seems i keep getting a assert exception on comment_forest.dart:40

@SupremeDeity
Copy link
Contributor Author

I wonder if it will be a better idea to create a Stream? Something which will maybe provide like 10 Comments each request, meaning it will also expand MoreComments into Comments if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants