File tree Expand file tree Collapse file tree 21 files changed +46
-20
lines changed
packages/stream_feeds/lib/src/state Expand file tree Collapse file tree 21 files changed +46
-20
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import 'activity_comment_list.dart';
2222import 'activity_state.dart' ;
2323import 'event/activity_event_handler.dart' ;
2424import 'query/activity_comments_query.dart' ;
25+ import 'state_notifier_extentions.dart' ;
2526
2627/// Represents a single activity with its data and state.
2728///
@@ -407,7 +408,7 @@ class Activity with Disposable {
407408 // region Internal helper methods
408409
409410 Future <Result <ActivityData >> _ensureActivityLoaded () async {
410- final activity = _stateNotifier.state .activity;
411+ final activity = _stateNotifier.value .activity;
411412 if (activity != null ) return Result .success (activity);
412413 return get ();
413414 }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import '../repository/comments_repository.dart';
99import 'activity_comment_list_state.dart' ;
1010import 'event/activity_comment_list_event_handler.dart' ;
1111import 'query/activity_comments_query.dart' ;
12+ import 'state_notifier_extentions.dart' ;
1213
1314/// Represents a list of activity comments with a query and state.
1415///
@@ -70,7 +71,7 @@ class ActivityCommentList extends Disposable {
7071 int ? limit,
7172 }) async {
7273 // Build the query with the current pagination state (with next page token)
73- final next = _stateNotifier.state .pagination? .next;
74+ final next = _stateNotifier.value .pagination? .next;
7475
7576 // Early return if no more comments available
7677 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import '../repository/activities_repository.dart';
1010import 'activity_list_state.dart' ;
1111import 'event/activity_list_event_handler.dart' ;
1212import 'query/activities_query.dart' ;
13+ import 'state_notifier_extentions.dart' ;
1314
1415/// Represents a list of activities with a query and state.
1516///
@@ -69,7 +70,7 @@ class ActivityList with Disposable {
6970 /// activities to return.
7071 Future <Result <List <ActivityData >>> queryMoreActivities ({int ? limit}) async {
7172 // Build the query with the current pagination state (with next page token)
72- final next = _stateNotifier.state .pagination? .next;
73+ final next = _stateNotifier.value .pagination? .next;
7374
7475 // Early return if no more activities available
7576 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import '../repository/activities_repository.dart';
1010import 'activity_reaction_list_state.dart' ;
1111import 'event/activity_reaction_list_event_handler.dart' ;
1212import 'query/activity_reactions_query.dart' ;
13+ import 'state_notifier_extentions.dart' ;
1314
1415/// Represents a list of activity reactions with a query and state.
1516///
@@ -68,7 +69,7 @@ class ActivityReactionList extends Disposable {
6869 int ? limit,
6970 }) async {
7071 // Build the query with the current pagination state (with next page token)
71- final next = _stateNotifier.state .pagination? .next;
72+ final next = _stateNotifier.value .pagination? .next;
7273
7374 // Early return if no more reactions available
7475 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import '../repository/bookmarks_repository.dart';
1010import 'bookmark_folder_list_state.dart' ;
1111import 'event/bookmark_folder_list_event_handler.dart' ;
1212import 'query/bookmark_folders_query.dart' ;
13+ import 'state_notifier_extentions.dart' ;
1314
1415/// Represents a list of bookmark folders with a query and state.
1516///
@@ -65,7 +66,7 @@ class BookmarkFolderList extends Disposable {
6566 int ? limit,
6667 }) async {
6768 // Build the query with the current pagination state (with next page token)
68- final next = _stateNotifier.state .pagination? .next;
69+ final next = _stateNotifier.value .pagination? .next;
6970
7071 // Early return if no more folders available
7172 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import '../repository/bookmarks_repository.dart';
1010import 'bookmark_list_state.dart' ;
1111import 'event/bookmark_list_event_handler.dart' ;
1212import 'query/bookmarks_query.dart' ;
13+ import 'state_notifier_extentions.dart' ;
1314
1415/// Represents a list of bookmarks with a query and state.
1516///
@@ -66,7 +67,7 @@ class BookmarkList with Disposable {
6667 /// bookmarks to return.
6768 Future <Result <List <BookmarkData >>> queryMoreBookmarks ({int ? limit}) async {
6869 // Build the query with the current pagination state (with next page token)
69- final next = _stateNotifier.state .pagination? .next;
70+ final next = _stateNotifier.value .pagination? .next;
7071
7172 // Early return if no more bookmarks available
7273 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import '../repository/comments_repository.dart';
99import 'comment_list_state.dart' ;
1010import 'event/comment_list_event_handler.dart' ;
1111import 'query/comments_query.dart' ;
12+ import 'state_notifier_extentions.dart' ;
1213
1314/// A list of comments with a query and state.
1415///
@@ -57,7 +58,7 @@ class CommentList extends Disposable {
5758 /// Returns a [Result] containing additional [CommentData] or an error.
5859 Future <Result <List <CommentData >>> queryMoreComments ({int ? limit}) async {
5960 // Build the query with the current pagination state (with next page token)
60- final next = _stateNotifier.state .pagination? .next;
61+ final next = _stateNotifier.value .pagination? .next;
6162
6263 // Early return if no more comments available
6364 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import '../repository/comments_repository.dart';
1010import 'comment_reaction_list_state.dart' ;
1111import 'event/comment_reaction_list_event_handler.dart' ;
1212import 'query/comment_reactions_query.dart' ;
13+ import 'state_notifier_extentions.dart' ;
1314
1415/// Represents a list of comment reactions with a query and state.
1516///
@@ -69,7 +70,7 @@ class CommentReactionList with Disposable {
6970 int ? limit,
7071 }) async {
7172 // Build the query with the current pagination state (with next page token)
72- final next = _stateNotifier.state .pagination? .next;
73+ final next = _stateNotifier.value .pagination? .next;
7374
7475 // Early return if no more reactions available
7576 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import '../repository/comments_repository.dart';
99import 'comment_reply_list_state.dart' ;
1010import 'event/comment_reply_list_event_handler.dart' ;
1111import 'query/comment_replies_query.dart' ;
12+ import 'state_notifier_extentions.dart' ;
1213
1314/// Represents a list of comment replies with a query and state.
1415///
@@ -68,7 +69,7 @@ class CommentReplyList with Disposable {
6869 int ? limit,
6970 }) async {
7071 // Build the query with the current pagination state (with next page token)
71- final next = _stateNotifier.state .pagination? .next;
72+ final next = _stateNotifier.value .pagination? .next;
7273
7374 // Early return if no more replies available
7475 if (next == null ) return const Result .success ([]);
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import 'feed_state.dart';
2525import 'member_list.dart' ;
2626import 'query/feed_query.dart' ;
2727import 'query/members_query.dart' ;
28+ import 'state_notifier_extentions.dart' ;
2829
2930/// A feed represents a collection of activities and provides methods to interact with them.
3031///
@@ -408,7 +409,7 @@ class Feed with Disposable {
408409 /// if the operation fails.
409410 Future <Result <List <ActivityData >>> queryMoreActivities ({int ? limit}) async {
410411 // Build the query with the current pagination state (with next page token)
411- final next = _stateNotifier.state .activitiesPagination? .next;
412+ final next = _stateNotifier.value .activitiesPagination? .next;
412413
413414 // Early return if no more activities available
414415 if (next == null ) return const Result .success ([]);
You can’t perform that action at this time.
0 commit comments