mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: medialist: del btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -158,6 +158,7 @@ class FavDetailController extends MultiSelectController {
|
|||||||
'favTitle': item.value.title,
|
'favTitle': item.value.title,
|
||||||
'count': item.value.mediaCount,
|
'count': item.value.mediaCount,
|
||||||
'desc': true,
|
'desc': true,
|
||||||
|
'isOwner': isOwner.value,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class FavVideoCardH extends StatelessWidget {
|
|||||||
final GestureTapCallback? onTap;
|
final GestureTapCallback? onTap;
|
||||||
final GestureLongPressCallback? onLongPress;
|
final GestureLongPressCallback? onLongPress;
|
||||||
final bool isOwner;
|
final bool isOwner;
|
||||||
final VoidCallback? onViewFav;
|
final VoidCallback onViewFav;
|
||||||
|
|
||||||
const FavVideoCardH({
|
const FavVideoCardH({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -33,7 +33,7 @@ class FavVideoCardH extends StatelessWidget {
|
|||||||
this.onTap,
|
this.onTap,
|
||||||
this.onLongPress,
|
this.onLongPress,
|
||||||
this.isOwner = false,
|
this.isOwner = false,
|
||||||
this.onViewFav,
|
required this.onViewFav,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -67,7 +67,7 @@ class FavVideoCardH extends StatelessWidget {
|
|||||||
Get.toNamed('/member?mid=${videoItem.owner?.mid}');
|
Get.toNamed('/member?mid=${videoItem.owner?.mid}');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
onViewFav!();
|
onViewFav();
|
||||||
// Utils.toViewPage(
|
// Utils.toViewPage(
|
||||||
// 'bvid=$bvid&cid=${videoItem.cid}${epId?.isNotEmpty == true ? '&epId=$epId' : ''}',
|
// 'bvid=$bvid&cid=${videoItem.cid}${epId?.isNotEmpty == true ? '&epId=$epId' : ''}',
|
||||||
// arguments: {
|
// arguments: {
|
||||||
|
|||||||
@@ -415,7 +415,8 @@ class VideoDetailController extends GetxController
|
|||||||
getMediaList(isLoadPrevious: true);
|
getMediaList(isLoadPrevious: true);
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
onDelete: ['watchLater', 'fav'].contains(sourceType)
|
onDelete: sourceType == 'watchLater' ||
|
||||||
|
(sourceType == 'fav' && Get.arguments?['isOwner'] == true)
|
||||||
? (index) async {
|
? (index) async {
|
||||||
if (sourceType == 'watchLater') {
|
if (sourceType == 'watchLater') {
|
||||||
var res = await UserHttp.toViewDel(
|
var res = await UserHttp.toViewDel(
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ class _MediaListPanelState extends CommonSlidePageState<MediaListPanel> {
|
|||||||
widget.onDelete != null && widget.mediaList.length > 1;
|
widget.onDelete != null && widget.mediaList.length > 1;
|
||||||
return ScrollablePositionedList.builder(
|
return ScrollablePositionedList.builder(
|
||||||
itemScrollController: _scrollController,
|
itemScrollController: _scrollController,
|
||||||
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
itemCount: widget.mediaList.length,
|
itemCount: widget.mediaList.length,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
|
|||||||
Reference in New Issue
Block a user