mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 02:56:58 +08:00
opt: common ctr
opt: state Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -68,12 +68,12 @@ class _ZonePageState extends CommonPageState<ZonePage, ZoneController>
|
||||
Widget _buildBody(LoadingState<List<dynamic>?> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => _buildSkeleton(),
|
||||
Success() => loadingState.response?.isNotEmpty == true
|
||||
Success(:var response) => response?.isNotEmpty == true
|
||||
? SliverGrid(
|
||||
gridDelegate: Grid.videoCardHDelegate(context),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final item = loadingState.response![index];
|
||||
final item = response[index];
|
||||
if (item is HotVideoItemModel) {
|
||||
return VideoCardH(
|
||||
videoItem: item,
|
||||
@@ -82,12 +82,12 @@ class _ZonePageState extends CommonPageState<ZonePage, ZoneController>
|
||||
}
|
||||
return PgcRankItem(item: item);
|
||||
},
|
||||
childCount: loadingState.response!.length,
|
||||
childCount: response!.length,
|
||||
),
|
||||
)
|
||||
: 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