opt trending header

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-30 19:23:41 +08:00
parent ed6353e6d5
commit f615a43259
5 changed files with 95 additions and 64 deletions

View File

@@ -16,14 +16,11 @@ class SearchTrendingController
@override
List<SearchTrendingItemModel>? getDataList(SearchTrendingData response) {
List<SearchTrendingItemModel> topList =
response.topList ?? <SearchTrendingItemModel>[];
topCount = topList.length;
return response.list == null ? topList : topList
..addAll(response.list ?? []);
topCount = response.topCount;
return response.list;
}
@override
Future<LoadingState<SearchTrendingData>> customGetData() =>
SearchHttp.searchTrending();
SearchHttp.searchTrending(needsTop: true);
}