Skip to content

Commit 655d75b

Browse files
committed
refactor(feed_decorators): use dedicated function for content limitation bottom sheet
- Replace inline showModalBottomSheet calls with showContentLimitationBottomSheet function - Remove duplicate ContentLimitationBottomSheet widget creation - Simplify function calls by passing status and action parameters
1 parent bb90381 commit 655d75b

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

lib/feed_decorators/widgets/feed_decorator_loader_widget.dart

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,10 @@ class _FeedDecoratorLoaderWidgetState extends State<FeedDecoratorLoaderWidget> {
234234
);
235235
if (status != LimitationStatus.allowed) {
236236
if (mounted) {
237-
await showModalBottomSheet<void>(
237+
showContentLimitationBottomSheet(
238238
context: context,
239-
builder: (_) => ContentLimitationBottomSheet(
240-
title: l10n.limitReachedTitle,
241-
body: l10n.limitReachedBodyFollow,
242-
buttonText: l10n.manageMyContentButton,
243-
),
239+
status: status,
240+
action: ContentAction.followTopic,
244241
);
245242
}
246243
return;
@@ -272,13 +269,10 @@ class _FeedDecoratorLoaderWidgetState extends State<FeedDecoratorLoaderWidget> {
272269
);
273270
if (status != LimitationStatus.allowed) {
274271
if (mounted) {
275-
await showModalBottomSheet<void>(
272+
showContentLimitationBottomSheet(
276273
context: context,
277-
builder: (_) => ContentLimitationBottomSheet(
278-
title: l10n.limitReachedTitle,
279-
body: l10n.limitReachedBodyFollow,
280-
buttonText: l10n.manageMyContentButton,
281-
),
274+
status: status,
275+
action: ContentAction.followSource,
282276
);
283277
}
284278
return;

0 commit comments

Comments
 (0)