Skip to content

Commit 18f3c8b

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/sample-app-notifications
2 parents 88066b5 + 1988135 commit 18f3c8b

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

docs_code_snippets/04_01_feeds.dart

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,12 @@ Future<void> filteringExamples() async {
120120
}
121121

122122
Future<void> moreComplexFilterExamples() async {
123-
// Get all the activities where tags contain "green" and type is "post" or tag contains "orange" and type is "activity"
123+
// Get all the activities where filter tags contain both "green" and "orange"
124124
const query = FeedQuery(
125125
fid: FeedId(group: 'user', id: 'john'),
126-
activityFilter: Filter.or([
127-
Filter.and([
128-
Filter.in_(ActivitiesFilterField.filterTags, ['green']),
129-
Filter.equal(ActivitiesFilterField.type, 'post'),
130-
]),
131-
Filter.and([
132-
Filter.in_(ActivitiesFilterField.filterTags, ['orange']),
133-
Filter.equal(ActivitiesFilterField.type, 'activity'),
134-
]),
126+
activityFilter: Filter.and([
127+
Filter.in_(ActivitiesFilterField.filterTags, ['green']),
128+
Filter.in_(ActivitiesFilterField.filterTags, ['orange']),
135129
]),
136130
);
137131

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)