feat: 查看up主收藏订阅

This commit is contained in:
guozhigq
2024-07-06 15:37:50 +08:00
parent 4db4e1f32b
commit 6f30165079
12 changed files with 115 additions and 48 deletions

View File

@ -19,6 +19,7 @@ class FavDetailController extends GetxController {
RxList favList = [].obs;
RxString loadingText = '加载中...'.obs;
RxInt mediaCount = 0.obs;
late String isOwner;
@override
void onInit() {
@ -26,6 +27,7 @@ class FavDetailController extends GetxController {
if (Get.parameters.keys.isNotEmpty) {
mediaId = int.parse(Get.parameters['mediaId']!);
heroTag = Get.parameters['heroTag']!;
isOwner = Get.parameters['isOwner']!;
}
super.onInit();
}

View File

@ -212,6 +212,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
SliverChildBuilderDelegate((context, index) {
return FavVideoCardH(
videoItem: favList[index],
isOwner: _favDetailController.isOwner,
callFn: () => _favDetailController
.onCancelFav(favList[index].id),
);

View File

@ -18,12 +18,14 @@ class FavVideoCardH extends StatelessWidget {
final dynamic videoItem;
final Function? callFn;
final int? searchType;
final String isOwner;
const FavVideoCardH({
Key? key,
required this.videoItem,
this.callFn,
this.searchType,
required this.isOwner,
}) : super(key: key);
@override
@ -123,6 +125,7 @@ class FavVideoCardH extends StatelessWidget {
videoItem: videoItem,
callFn: callFn,
searchType: searchType,
isOwner: isOwner,
)
],
),
@ -140,11 +143,13 @@ class VideoContent extends StatelessWidget {
final dynamic videoItem;
final Function? callFn;
final int? searchType;
final String isOwner;
const VideoContent({
super.key,
required this.videoItem,
this.callFn,
this.searchType,
required this.isOwner,
});
@override
@ -211,7 +216,7 @@ class VideoContent extends StatelessWidget {
),
],
),
searchType != 1
searchType != 1 && isOwner == '1'
? Positioned(
right: 0,
bottom: -4,