@@ -12,9 +12,9 @@ class EntityDetailsState extends Equatable {
12
12
this .entityType,
13
13
this .entity,
14
14
this .isFollowing = false ,
15
- this .headlines = const [],
15
+ this .feedItems = const [], // Changed from headlines
16
16
this .headlinesStatus = EntityHeadlinesStatus .initial,
17
- this .hasMoreHeadlines = true ,
17
+ this .hasMoreHeadlines = true , // This refers to original headlines
18
18
this .headlinesCursor,
19
19
this .errorMessage,
20
20
});
@@ -23,18 +23,18 @@ class EntityDetailsState extends Equatable {
23
23
final EntityType ? entityType;
24
24
final dynamic entity; // Will be Category or Source
25
25
final bool isFollowing;
26
- final List <Headline > headlines;
26
+ final List <FeedItem > feedItems; // Changed from List<Headline>
27
27
final EntityHeadlinesStatus headlinesStatus;
28
- final bool hasMoreHeadlines;
29
- final String ? headlinesCursor;
28
+ final bool hasMoreHeadlines; // This refers to original headlines
29
+ final String ? headlinesCursor; // Cursor for fetching original headlines
30
30
final String ? errorMessage;
31
31
32
32
EntityDetailsState copyWith ({
33
33
EntityDetailsStatus ? status,
34
34
EntityType ? entityType,
35
35
dynamic entity,
36
36
bool ? isFollowing,
37
- List <Headline >? headlines,
37
+ List <FeedItem >? feedItems, // Changed
38
38
EntityHeadlinesStatus ? headlinesStatus,
39
39
bool ? hasMoreHeadlines,
40
40
String ? headlinesCursor,
@@ -48,10 +48,10 @@ class EntityDetailsState extends Equatable {
48
48
entityType: entityType ?? this .entityType,
49
49
entity: clearEntity ? null : entity ?? this .entity,
50
50
isFollowing: isFollowing ?? this .isFollowing,
51
- headlines : headlines ?? this .headlines,
51
+ feedItems : feedItems ?? this .feedItems, // Changed
52
52
headlinesStatus: headlinesStatus ?? this .headlinesStatus,
53
53
hasMoreHeadlines: hasMoreHeadlines ?? this .hasMoreHeadlines,
54
- headlinesCursor:
54
+ headlinesCursor: // This cursor is for fetching original headlines
55
55
clearHeadlinesCursor ? null : headlinesCursor ?? this .headlinesCursor,
56
56
errorMessage:
57
57
clearErrorMessage ? null : errorMessage ?? this .errorMessage,
@@ -64,7 +64,7 @@ class EntityDetailsState extends Equatable {
64
64
entityType,
65
65
entity,
66
66
isFollowing,
67
- headlines,
67
+ feedItems, // Changed
68
68
headlinesStatus,
69
69
hasMoreHeadlines,
70
70
headlinesCursor,
0 commit comments