Skip to content

Commit c646379

Browse files
committed
refactor(feed_decorators): remove dismiss option from content collection decorator
- Remove PopupMenuButton for dismiss option - Update widget documentation to reflect removal of dismiss functionality - Remove onDismiss parameter from ContentCollectionDecoratorWidget class
1 parent e469f8a commit c646379

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/shared/widgets/feed_decorators/content_collection_decorator_widget.dart

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ import 'package:ui_kit/ui_kit.dart';
88
/// A widget to display a horizontally scrollable list of suggested content
99
/// (e.g., Topics or Sources).
1010
///
11-
/// This widget presents a title, a horizontal list of [SuggestionItemWidget]s,
12-
/// and a dismiss option via a [PopupMenuButton].
11+
/// This widget presents a title and a horizontal list of [SuggestionItemWidget]s.
1312
/// {@endtemplate}
1413
class ContentCollectionDecoratorWidget extends StatelessWidget {
1514
/// {@macro content_collection_decorator_widget}
1615
const ContentCollectionDecoratorWidget({
1716
required this.item,
1817
required this.onFollowToggle,
19-
required this.onDismiss,
2018
required this.followedTopicIds,
2119
required this.followedSourceIds,
2220
super.key,
@@ -29,9 +27,6 @@ class ContentCollectionDecoratorWidget extends StatelessWidget {
2927
/// is pressed.
3028
final ValueSetter<FeedItem> onFollowToggle;
3129

32-
/// Callback function when the dismiss option is selected.
33-
final ValueSetter<FeedDecoratorType> onDismiss;
34-
3530
/// List of IDs of topics the user is currently following.
3631
final List<String> followedTopicIds;
3732

@@ -80,19 +75,6 @@ class ContentCollectionDecoratorWidget extends StatelessWidget {
8075
overflow: TextOverflow.ellipsis,
8176
),
8277
),
83-
PopupMenuButton<String>(
84-
onSelected: (value) {
85-
if (value == 'dismiss') {
86-
onDismiss(item.decoratorType);
87-
}
88-
},
89-
itemBuilder: (context) => [
90-
PopupMenuItem(
91-
value: 'dismiss',
92-
child: Text(l10n.neverShowAgain),
93-
),
94-
],
95-
),
9678
],
9779
),
9880
const SizedBox(height: AppSpacing.md),

0 commit comments

Comments
 (0)