mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-17 06:33:59 +08:00
@@ -1,4 +1,3 @@
|
||||
import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
||||
import 'package:PiliPlus/common/widgets/flutter/refresh_indicator.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/common/widgets/sliver/sliver_pinned_header.dart';
|
||||
@@ -69,11 +68,7 @@ class _MemberFavoriteState extends State<MemberFavorite>
|
||||
return switch (loadingState) {
|
||||
Loading() => SliverPadding(
|
||||
padding: const EdgeInsets.only(top: 7),
|
||||
sliver: SliverGrid.builder(
|
||||
gridDelegate: Grid.videoCardHDelegate(context),
|
||||
itemBuilder: (context, index) => const VideoCardHSkeleton(),
|
||||
itemCount: 10,
|
||||
),
|
||||
sliver: gridSkeleton,
|
||||
),
|
||||
Success(:final response) =>
|
||||
response != null && response.isNotEmpty
|
||||
@@ -168,18 +163,15 @@ class _MemberFavoriteState extends State<MemberFavorite>
|
||||
itemCount: list.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = list[index];
|
||||
return SizedBox(
|
||||
height: 98,
|
||||
child: MemberFavItem(
|
||||
item: item,
|
||||
onDelete: (isDeleted) {
|
||||
if (isDeleted ?? false) {
|
||||
_controller.favState
|
||||
..value.mediaListResponse?.list?.remove(item)
|
||||
..refresh();
|
||||
}
|
||||
},
|
||||
),
|
||||
return MemberFavItem(
|
||||
item: item,
|
||||
onDelete: (isDeleted) {
|
||||
if (isDeleted ?? false) {
|
||||
_controller.favState
|
||||
..value.mediaListResponse?.list?.remove(item)
|
||||
..refresh();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -8,7 +8,6 @@ import 'package:PiliPlus/pages/subscription_detail/view.dart';
|
||||
import 'package:PiliPlus/utils/bili_utils.dart';
|
||||
import 'package:PiliPlus/utils/num_utils.dart';
|
||||
import 'package:PiliPlus/utils/platform_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart' hide LayoutBuilder;
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -37,10 +36,7 @@ class MemberFavItem extends StatelessWidget {
|
||||
if (item.type == 0 || item.type == 11) {
|
||||
final isDeleted = await Get.toNamed(
|
||||
'/favDetail',
|
||||
parameters: {
|
||||
'mediaId': item.id.toString(),
|
||||
'heroTag': Utils.makeHeroTag(item.id),
|
||||
},
|
||||
parameters: {'mediaId': item.id.toString()},
|
||||
);
|
||||
onDelete?.call(isDeleted);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user