stream-feed-flutter
stream-feed-flutter copied to clipboard
Total count of reactions on all posts owned by a user
Is there any aggregation operation to determine the total count of reactions on all posts owned by a user?
Hey @svk014, sorry for the late response. I think something like this should work:
final activities = await yourfeed.getEnrichedActivities(flags: EnrichmentFlags().withOwnReactions().withReactionCounts().reactionKindFilter("comment"));
final commentCount = activities.map((activity) => activity.reactionCounts["comment"]).reduce((a, b) => a + b);
Thank you for your response. Let me try this and get back to you.
@sachaarbonel won't the first call be paginated?