diff --git a/packages/app/lib/ui/widgets/pagination_used_for_tags_list.dart b/packages/app/lib/ui/widgets/pagination_used_for_tags_list.dart index ef76a4e1..25edcc12 100644 --- a/packages/app/lib/ui/widgets/pagination_used_for_tags_list.dart +++ b/packages/app/lib/ui/widgets/pagination_used_for_tags_list.dart @@ -135,6 +135,11 @@ class _PaginationUsedForTagListState extends State { return this._emptyResult(context); } + var seen = Set(); + List uniqueUses = data.documents + .where((usedFor) => seen.add(usedFor.usedFor)) + .toList(); + return Material( color: MeliColors.white, shape: const RoundedRectangleBorder( @@ -146,7 +151,7 @@ class _PaginationUsedForTagListState extends State { child: SingleChildScrollView( controller: scrollController, child: Wrap(children: [ - ...this.widget.itemsBuilder(data.documents), + ...this.widget.itemsBuilder(uniqueUses), if (data.hasNextPage) this._loadMore(context, result.isLoading, onLoadMore: () { fetchMore!(opts);