mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
revert: hot page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import 'package:PiliPalaX/grpc/app/card/v1/card.pb.dart';
|
||||
import 'package:PiliPalaX/http/loading_state.dart';
|
||||
import 'package:PiliPalaX/pages/common/popup_controller.dart';
|
||||
import 'package:PiliPalaX/http/video.dart';
|
||||
|
||||
class HotController extends PopupController {
|
||||
int idx = 0;
|
||||
// int idx = 0;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -12,23 +11,23 @@ class HotController extends PopupController {
|
||||
queryData();
|
||||
}
|
||||
|
||||
// @override
|
||||
// Future onRefresh() {
|
||||
// idx = 0;
|
||||
// return super.onRefresh();
|
||||
// }
|
||||
|
||||
@override
|
||||
Future onRefresh() {
|
||||
idx = 0;
|
||||
return super.onRefresh();
|
||||
}
|
||||
Future<LoadingState> customGetData() => VideoHttp.hotVideoList(
|
||||
pn: currentPage,
|
||||
ps: 20,
|
||||
);
|
||||
|
||||
// @override
|
||||
// Future<LoadingState> customGetData() => VideoHttp.hotVideoList(
|
||||
// pn: currentPage,
|
||||
// ps: _count,
|
||||
// );
|
||||
// void handleSuccess(List currentList, List dataList) {
|
||||
// idx = (dataList.last as Card?)?.smallCoverV5.base.idx.toInt() ?? 0;
|
||||
// }
|
||||
|
||||
@override
|
||||
void handleSuccess(List currentList, List dataList) {
|
||||
idx = (dataList.last as Card?)?.smallCoverV5.base.idx.toInt() ?? 0;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<LoadingState> customGetData() => VideoHttp.hotVideoListGrpc(idx: idx);
|
||||
// @override
|
||||
// Future<LoadingState> customGetData() => VideoHttp.hotVideoListGrpc(idx: idx);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:PiliPalaX/common/widgets/refresh_indicator.dart';
|
||||
import 'package:PiliPalaX/common/widgets/video_card_h_grpc.dart';
|
||||
import 'package:PiliPalaX/common/widgets/video_card_h.dart';
|
||||
import 'package:PiliPalaX/http/loading_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
@@ -137,7 +137,7 @@ class _HotPageState extends State<HotPage> with AutomaticKeepAliveClientMixin {
|
||||
),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
return VideoCardHGrpc(
|
||||
return VideoCardH(
|
||||
videoItem: loadingState.response[index],
|
||||
showPubdate: true,
|
||||
longPress: () {
|
||||
|
||||
Reference in New Issue
Block a user