mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: media list page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -12,21 +12,21 @@ import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
|
||||
|
||||
class MediaListPanel extends StatefulWidget {
|
||||
const MediaListPanel({
|
||||
super.key,
|
||||
required this.mediaList,
|
||||
this.changeMediaList,
|
||||
this.panelTitle,
|
||||
this.bvid,
|
||||
this.hasMore = false,
|
||||
required this.loadMoreMedia,
|
||||
super.key,
|
||||
required this.count,
|
||||
});
|
||||
|
||||
final List<MediaVideoItemModel> mediaList;
|
||||
final Function? changeMediaList;
|
||||
final String? panelTitle;
|
||||
final String? bvid;
|
||||
final bool hasMore;
|
||||
final VoidCallback loadMoreMedia;
|
||||
final int count;
|
||||
|
||||
@override
|
||||
State<MediaListPanel> createState() => _MediaListPanelState();
|
||||
@@ -78,7 +78,7 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
||||
itemBuilder: ((context, index) {
|
||||
var item = widget.mediaList[index];
|
||||
if (index == widget.mediaList.length - 1 &&
|
||||
widget.hasMore) {
|
||||
widget.mediaList.length < widget.count) {
|
||||
widget.loadMoreMedia();
|
||||
}
|
||||
return InkWell(
|
||||
|
||||
@@ -366,7 +366,7 @@ class VideoDetailController extends GetxController
|
||||
changeMediaList: changeMediaList,
|
||||
panelTitle: watchLaterTitle.value,
|
||||
bvid: bvid,
|
||||
hasMore: mediaList.length < Get.arguments['count'],
|
||||
count: Get.arguments['count'],
|
||||
loadMoreMedia: loadMoreMedia,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user