mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-08 02:57:47 +08:00
fix: media type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -329,16 +329,17 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
void getMediaList() async {
|
||||
if (mediaList.length >= Get.arguments['count']) {
|
||||
if (Get.arguments['count'] != null &&
|
||||
mediaList.length >= Get.arguments['count']) {
|
||||
return;
|
||||
}
|
||||
var res = await UserHttp.getMediaList(
|
||||
type: _mediaType,
|
||||
type: Get.arguments['mediaType'] ?? _mediaType,
|
||||
bizId: Get.arguments['mediaId'] ?? -1,
|
||||
ps: 20,
|
||||
oid: mediaList.isEmpty ? null : mediaList.last.id,
|
||||
otype: mediaList.isEmpty ? null : mediaList.last.type,
|
||||
desc: _mediaType == 2 ? false : true,
|
||||
desc: _mediaType == 2 || Get.arguments['mediaType'] == '8' ? false : true,
|
||||
);
|
||||
if (res['status']) {
|
||||
if (res['data'].isNotEmpty) {
|
||||
|
||||
@@ -1415,9 +1415,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
return Stack(
|
||||
children: [
|
||||
introPanel(),
|
||||
AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
curve: Curves.easeInOut,
|
||||
Positioned(
|
||||
left: 12,
|
||||
right: 12,
|
||||
bottom: MediaQuery.of(context).padding.bottom + 12,
|
||||
|
||||
@@ -27,7 +27,7 @@ class MediaListPanel extends StatefulWidget {
|
||||
final String? panelTitle;
|
||||
final String? bvid;
|
||||
final VoidCallback loadMoreMedia;
|
||||
final int count;
|
||||
final int? count;
|
||||
|
||||
@override
|
||||
State<MediaListPanel> createState() => _MediaListPanelState();
|
||||
@@ -84,7 +84,8 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
||||
itemBuilder: ((context, index) {
|
||||
var item = widget.mediaList[index];
|
||||
if (index == widget.mediaList.length - 1 &&
|
||||
widget.mediaList.length < widget.count) {
|
||||
(widget.count == null ||
|
||||
widget.mediaList.length < widget.count!)) {
|
||||
widget.loadMoreMedia();
|
||||
}
|
||||
return InkWell(
|
||||
@@ -158,6 +159,10 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontWeight:
|
||||
item.bvid == widget.bvid
|
||||
? FontWeight.bold
|
||||
: null,
|
||||
color: item.bvid == widget.bvid
|
||||
? Theme.of(context)
|
||||
.colorScheme
|
||||
|
||||
Reference in New Issue
Block a user