Skip to content

Commit 49ba7df

Browse files
authored
fix(samples): Show first 10 followers and show total counts (#30)
* Show first 10 followers and show total counts * remove unused variable
1 parent 192bcb2 commit 49ba7df

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sample_app/lib/screens/user_feed/profile/user_profile.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ class _UserProfileState extends State<UserProfile> {
6363
final feedMembers = state.members;
6464
final followRequests = state.followRequests;
6565
final following = state.following;
66-
final followers = state.followers;
6766
final currentUser = client.user;
6867

6968
return SingleChildScrollView(
@@ -76,9 +75,9 @@ class _UserProfileState extends State<UserProfile> {
7675
// Profile Header Section
7776
ProfileHeader(
7877
user: currentUser,
79-
membersCount: feedMembers.length,
80-
followingCount: following.length,
81-
followersCount: followers.length,
78+
membersCount: state.feed?.memberCount ?? 0,
79+
followingCount: state.feed?.followingCount ?? 0,
80+
followersCount: state.feed?.followerCount ?? 0,
8281
),
8382

8483
// Members Section

sample_app/lib/screens/user_feed/user_feed_screen.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ class _UserFeedScreenState extends State<UserFeedScreen> {
3636
visibility: FeedVisibility.public,
3737
members: [FeedMemberRequestData(userId: client.user.id)],
3838
),
39+
followerLimit: 10,
40+
followingLimit: 10,
41+
memberLimit: 10,
3942
),
4043
);
4144

0 commit comments

Comments
 (0)