File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,6 @@ class ExperimentalFlags {
9595
9696 bool get useSearchPost => isEnabled ('search-post' );
9797
98- bool get showTrending => true ;
99-
10098 String encodedAsCookie () => _enabled.join (':' );
10199
102100 @override
Original file line number Diff line number Diff line change 33// BSD-style license that can be found in the LICENSE file.
44
55import 'package:_pub_shared/search/tags.dart' ;
6- import 'package:pub_dev/frontend/request_context.dart' ;
76
87import '../dom/dom.dart' as d;
98
@@ -119,16 +118,13 @@ final _sortDicts = const <SortDict>[
119118 id: 'downloads' ,
120119 label: 'downloads' ,
121120 tooltip: 'Packages are sorted by their download counts.' ),
121+ SortDict (
122+ id: 'trending' ,
123+ label: 'trending' ,
124+ tooltip: 'Packages are sorted by trending.' ),
122125];
123126
124127List <SortDict > getSortDicts (bool isSearch) {
125128 final removeId = isSearch ? 'listing_relevance' : 'search_relevance' ;
126- return < SortDict > [
127- ..._sortDicts.where ((d) => d.id != removeId),
128- if (requestContext.experimentalFlags.showTrending)
129- SortDict (
130- id: 'trending' ,
131- label: 'trending' ,
132- tooltip: 'Packages are sorted by trending.' ),
133- ];
129+ return _sortDicts.where ((d) => d.id != removeId).toList ();
134130}
You can’t perform that action at this time.
0 commit comments