mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-21 16:48:43 +00:00
opt: unify trending api & feat: search recommend (#694)
* opt: unify trending api * opt: disable icon * feat: search recommend * mod: recommend api
This commit is contained in:
committed by
GitHub
parent
3638d65008
commit
f0e3b776bb
@@ -5,7 +5,7 @@ import 'package:PiliPlus/models/search/search_trending/trending_list.dart';
|
||||
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
||||
|
||||
class SearchTrendingController
|
||||
extends CommonListController<TrendingData, TrendingList> {
|
||||
extends CommonListController<TrendingData, SearchKeywordList> {
|
||||
int topCount = 0;
|
||||
|
||||
@override
|
||||
@@ -15,10 +15,11 @@ class SearchTrendingController
|
||||
}
|
||||
|
||||
@override
|
||||
List<TrendingList>? getDataList(TrendingData response) {
|
||||
List<TrendingList> topList = (response.topList ?? <TrendingList>[]);
|
||||
List<SearchKeywordList>? getDataList(TrendingData response) {
|
||||
List<SearchKeywordList> topList = response.topList ?? <TrendingList>[];
|
||||
topCount = topList.length;
|
||||
return topList + (response.list ?? <TrendingList>[]);
|
||||
return response.list == null ? topList : topList
|
||||
..addAll(response.list ?? []);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user