Skip to content

Commit 087bf6f

Browse files
committed
refactor(headlines-feed): remove followed topics from TopicsFilterState
- Remove followedTopicsStatus and followedTopics properties - Update copyWith method to remove followedTopics-related parameters - Update props list to exclude followedTopics and followedTopicsStatus
1 parent 3ae57f5 commit 087bf6f

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lib/headlines-feed/bloc/topics_filter_state.dart

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ final class TopicsFilterState extends Equatable {
3232
this.hasMore = true,
3333
this.cursor,
3434
this.error,
35-
this.followedTopicsStatus = TopicsFilterStatus.initial,
36-
this.followedTopics = const [],
3735
});
3836

3937
/// The current status of fetching topics.
@@ -52,24 +50,15 @@ final class TopicsFilterState extends Equatable {
5250
/// An optional error object if the status is [TopicsFilterStatus.failure].
5351
final HttpException? error;
5452

55-
/// The current status of fetching followed topics.
56-
final TopicsFilterStatus followedTopicsStatus;
57-
58-
/// The list of [Topic] objects representing the user's followed topics.
59-
final List<Topic> followedTopics;
60-
6153
/// Creates a copy of this state with the given fields replaced.
6254
TopicsFilterState copyWith({
6355
TopicsFilterStatus? status,
6456
List<Topic>? topics,
6557
bool? hasMore,
6658
String? cursor,
6759
HttpException? error,
68-
TopicsFilterStatus? followedTopicsStatus,
69-
List<Topic>? followedTopics,
7060
bool clearError = false,
7161
bool clearCursor = false,
72-
bool clearFollowedTopicsError = false,
7362
}) {
7463
return TopicsFilterState(
7564
status: status ?? this.status,
@@ -79,8 +68,6 @@ final class TopicsFilterState extends Equatable {
7968
cursor: clearCursor ? null : (cursor ?? this.cursor),
8069
// Clear error if requested, otherwise keep existing or use new one
8170
error: clearError ? null : error ?? this.error,
82-
followedTopicsStatus: followedTopicsStatus ?? this.followedTopicsStatus,
83-
followedTopics: followedTopics ?? this.followedTopics,
8471
);
8572
}
8673

@@ -91,7 +78,5 @@ final class TopicsFilterState extends Equatable {
9178
hasMore,
9279
cursor,
9380
error,
94-
followedTopicsStatus,
95-
followedTopics,
9681
];
9782
}

0 commit comments

Comments
 (0)