mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
@@ -8,7 +8,6 @@ import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models/search/result.dart';
|
||||
import 'package:PiliPlus/models_new/later/list.dart';
|
||||
import 'package:PiliPlus/pages/later/controller.dart';
|
||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||
@@ -33,13 +32,6 @@ class VideoCardHLater extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String type = 'video';
|
||||
if (videoItem case SearchVideoItemModel item) {
|
||||
var typeOrNull = item.type;
|
||||
if (typeOrNull != null && typeOrNull.isNotEmpty) {
|
||||
type = typeOrNull;
|
||||
}
|
||||
}
|
||||
final theme = Theme.of(context);
|
||||
final enableMultiSelect = ctr.enableMultiSelect.value;
|
||||
|
||||
@@ -57,11 +49,11 @@ class VideoCardHLater extends StatelessWidget {
|
||||
onTap: enableMultiSelect
|
||||
? () => ctr.onSelect(videoItem)
|
||||
: () async {
|
||||
if (type == 'ketang') {
|
||||
if (videoItem.isPugv ?? false) {
|
||||
PageUtils.viewPugv(seasonId: videoItem.aid);
|
||||
return;
|
||||
}
|
||||
if (videoItem.isPgc == true) {
|
||||
if (videoItem.isPgc ?? false) {
|
||||
if (videoItem.bangumi?.epId != null) {
|
||||
PageUtils.viewPgc(epId: videoItem.bangumi!.epId);
|
||||
} else if (videoItem.redirectUrl?.isNotEmpty == true) {
|
||||
@@ -125,7 +117,7 @@ class VideoCardHLater extends StatelessWidget {
|
||||
top: 6.0,
|
||||
right: 6.0,
|
||||
)
|
||||
else if (type == 'ketang')
|
||||
else if (videoItem.isPugv ?? false)
|
||||
const PBadge(
|
||||
text: '课堂',
|
||||
top: 6.0,
|
||||
|
||||
Reference in New Issue
Block a user