mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-04 17:50:13 +08:00
opt: common ctr
opt: state Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -40,7 +40,7 @@ class SearchAllController
|
||||
@override
|
||||
Future<LoadingState<SearchAllModel>> customGetData() => SearchHttp.searchAll(
|
||||
keyword: keyword,
|
||||
page: currentPage,
|
||||
page: page,
|
||||
order: order.value,
|
||||
duration: searchType == SearchType.video ? duration.value : null,
|
||||
tids: tids,
|
||||
|
||||
@@ -60,7 +60,7 @@ class SearchPanelController<R extends SearchNumData<T>, T>
|
||||
Future<LoadingState<R>> customGetData() => SearchHttp.searchByType<R>(
|
||||
searchType: searchType,
|
||||
keyword: keyword,
|
||||
page: currentPage,
|
||||
page: page,
|
||||
order: order.value,
|
||||
duration: searchType == SearchType.video ? duration.value : null,
|
||||
tids: tids,
|
||||
|
||||
@@ -104,13 +104,13 @@ abstract class CommonSearchPanelState<
|
||||
sliver: _builLoading,
|
||||
)
|
||||
: _builLoading,
|
||||
Success() => loadingState.response?.isNotEmpty == true
|
||||
? buildList(theme, loadingState.response!)
|
||||
Success(:var response) => response?.isNotEmpty == true
|
||||
? buildList(theme, response!)
|
||||
: HttpError(
|
||||
onReload: controller.onReload,
|
||||
),
|
||||
Error() => HttpError(
|
||||
errMsg: loadingState.errMsg,
|
||||
Error(:var errMsg) => HttpError(
|
||||
errMsg: errMsg,
|
||||
onReload: controller.onReload,
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user