Skip to content

Commit 369edc9

Browse files
committed
refactor(entity-details): update bloc to use remoteConfig instead of appConfig
- Replace appConfig with remoteConfig in EntityDetailsBloc - Update method calls to use remoteConfig parameter - Throw exception if remoteConfig is not available
1 parent b98914e commit 369edc9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/entity_details/bloc/entity_details_bloc.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ class EntityDetailsBloc extends Bloc<EntityDetailsEvent, EntityDetailsState> {
9898
);
9999

100100
final currentUser = _appBloc.state.user;
101-
final appConfig = _appBloc.state.appConfig;
101+
final remoteConfig = _appBloc.state.remoteConfig;
102102

103-
if (appConfig == null) {
103+
if (remoteConfig == null) {
104104
throw const OperationFailedException(
105105
'App configuration not available.',
106106
);
@@ -109,7 +109,7 @@ class EntityDetailsBloc extends Bloc<EntityDetailsEvent, EntityDetailsState> {
109109
final processedFeedItems = _feedInjectorService.injectItems(
110110
headlines: headlineResponse.items,
111111
user: currentUser,
112-
appConfig: appConfig,
112+
remoteConfig: remoteConfig,
113113
currentFeedItemCount: 0,
114114
);
115115

@@ -210,9 +210,9 @@ class EntityDetailsBloc extends Bloc<EntityDetailsEvent, EntityDetailsState> {
210210
);
211211

212212
final currentUser = _appBloc.state.user;
213-
final appConfig = _appBloc.state.appConfig;
213+
final remoteConfig = _appBloc.state.remoteConfig;
214214

215-
if (appConfig == null) {
215+
if (remoteConfig == null) {
216216
throw const OperationFailedException(
217217
'App configuration not available for pagination.',
218218
);
@@ -221,7 +221,7 @@ class EntityDetailsBloc extends Bloc<EntityDetailsEvent, EntityDetailsState> {
221221
final newProcessedFeedItems = _feedInjectorService.injectItems(
222222
headlines: headlineResponse.items,
223223
user: currentUser,
224-
appConfig: appConfig,
224+
remoteConfig: remoteConfig,
225225
currentFeedItemCount: state.feedItems.length,
226226
);
227227

0 commit comments

Comments
 (0)