Skip to content

Commit 9e56060

Browse files
committed
refactor(headlines-feed): simplify state management in TopicsFilterBloc
- Remove redundant error field when clearing followed topics error - Replace specific error with a more generic clearError flag - Update state copy operation to use the new clearError flag
1 parent 05c3e36 commit 9e56060

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/headlines-feed/bloc/topics_filter_bloc.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ class TopicsFilterBloc extends Bloc<TopicsFilterEvent, TopicsFilterState> {
151151
state.copyWith(
152152
followedTopicsStatus: TopicsFilterStatus.success,
153153
followedTopics: const [],
154-
error: const OperationFailedException('No followed topics found.'),
155-
clearFollowedTopicsError: true,
154+
clearError: true,
156155
),
157156
);
158157
return;

0 commit comments

Comments
 (0)