From 1e02497d31c9b5e8084c821dad9cd12fc29154c8 Mon Sep 17 00:00:00 2001 From: Rene Floor Date: Wed, 10 Sep 2025 15:56:51 +0200 Subject: [PATCH] update filter example --- docs_code_snippets/04_01_feeds.dart | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs_code_snippets/04_01_feeds.dart b/docs_code_snippets/04_01_feeds.dart index 7708ed38..701eedbf 100644 --- a/docs_code_snippets/04_01_feeds.dart +++ b/docs_code_snippets/04_01_feeds.dart @@ -120,18 +120,12 @@ Future filteringExamples() async { } Future moreComplexFilterExamples() async { - // Get all the activities where tags contain "green" and type is "post" or tag contains "orange" and type is "activity" + // Get all the activities where filter tags contain both "green" and "orange" const query = FeedQuery( fid: FeedId(group: 'user', id: 'john'), - activityFilter: Filter.or([ - Filter.and([ - Filter.in_(ActivitiesFilterField.filterTags, ['green']), - Filter.equal(ActivitiesFilterField.type, 'post'), - ]), - Filter.and([ - Filter.in_(ActivitiesFilterField.filterTags, ['orange']), - Filter.equal(ActivitiesFilterField.type, 'activity'), - ]), + activityFilter: Filter.and([ + Filter.in_(ActivitiesFilterField.filterTags, ['green']), + Filter.in_(ActivitiesFilterField.filterTags, ['orange']), ]), );