Skip to content

Commit 8c7ad5d

Browse files
committed
refactor(ad): clarify ad placeholder injection process in search
- Add comments to explain the ad placeholder injection process - Emphasize that ad loading and lifecycle are managed by the UI layer - Improve code readability without changing functionality
1 parent f851239 commit 8c7ad5d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/headlines-search/bloc/headlines_search_bloc.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ class HeadlinesSearchBloc
110110
return;
111111
}
112112
// For search pagination, only inject ad placeholders.
113-
final injectedItems =
114-
await _feedDecoratorService.injectAdPlaceholders(
113+
//
114+
// This method injects stateless `AdPlaceholder` markers into the feed.
115+
// The full ad loading and lifecycle is managed by the UI layer.
116+
// See `FeedDecoratorService` for a detailed explanation.
117+
final injectedItems = await _feedDecoratorService.injectAdPlaceholders(
115118
feedItems: headlines,
116119
user: currentUser,
117120
adConfig: appConfig.adConfig,
@@ -220,6 +223,10 @@ class HeadlinesSearchBloc
220223
return;
221224
}
222225
// For search results, only inject ad placeholders.
226+
//
227+
// This method injects stateless `AdPlaceholder` markers into the feed.
228+
// The full ad loading and lifecycle is managed by the UI layer.
229+
// See `FeedDecoratorService` for a detailed explanation.
223230
processedItems = await _feedDecoratorService.injectAdPlaceholders(
224231
feedItems: headlines,
225232
user: currentUser,

0 commit comments

Comments
 (0)