diff --git a/lib/common/widgets/video_card/video_card_h.dart b/lib/common/widgets/video_card/video_card_h.dart index fe27c3c8d..b17a90768 100644 --- a/lib/common/widgets/video_card/video_card_h.dart +++ b/lib/common/widgets/video_card/video_card_h.dart @@ -24,20 +24,12 @@ class VideoCardH extends StatelessWidget { const VideoCardH({ super.key, required this.videoItem, - this.showOwner = true, - this.showView = true, - this.showDanmaku = true, - this.showPubdate = false, this.onTap, this.onLongPress, this.onViewLater, this.onRemove, }); final BaseVideoItemModel videoItem; - final bool showOwner; - final bool showView; - final bool showDanmaku; - final bool showPubdate; final VoidCallback? onTap; final VoidCallback? onLongPress; final ValueChanged? onViewLater; @@ -199,8 +191,8 @@ class VideoCardH extends StatelessWidget { Widget content(BuildContext context) { final theme = Theme.of(context); - String pubdate = showPubdate ? DateUtil.dateFormat(videoItem.pubdate!) : ''; - if (pubdate != '') pubdate += ' '; + String pubdate = DateUtil.dateFormat(videoItem.pubdate!); + if (pubdate != '') pubdate += ' '; return Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -242,31 +234,28 @@ class VideoCardH extends StatelessWidget { overflow: TextOverflow.ellipsis, ), ), - if (showOwner || showPubdate) - Text( - "$pubdate ${showOwner ? videoItem.owner.name : ''}", - maxLines: 1, - style: TextStyle( - fontSize: 12, - height: 1, - color: theme.colorScheme.outline, - overflow: TextOverflow.clip, - ), + Text( + "$pubdate${videoItem.owner.name}", + maxLines: 1, + style: TextStyle( + fontSize: 12, + height: 1, + color: theme.colorScheme.outline, + overflow: TextOverflow.clip, ), + ), const SizedBox(height: 3), Row( spacing: 8, children: [ - if (showView) - StatWidget( - type: StatType.play, - value: videoItem.stat.view, - ), - if (showDanmaku) - StatWidget( - type: StatType.danmaku, - value: videoItem.stat.danmu, - ), + StatWidget( + type: StatType.play, + value: videoItem.stat.view, + ), + StatWidget( + type: StatType.danmaku, + value: videoItem.stat.danmu, + ), ], ), ], diff --git a/lib/pages/hot/view.dart b/lib/pages/hot/view.dart index 796476cef..95e43f173 100644 --- a/lib/pages/hot/view.dart +++ b/lib/pages/hot/view.dart @@ -168,7 +168,6 @@ class _HotPageState extends CommonPageState } return VideoCardH( videoItem: response[index], - showPubdate: true, onRemove: () => controller.loadingState ..value.data!.removeAt(index) ..refresh(), diff --git a/lib/pages/rank/zone/view.dart b/lib/pages/rank/zone/view.dart index 1e43c0663..ed6eb9178 100644 --- a/lib/pages/rank/zone/view.dart +++ b/lib/pages/rank/zone/view.dart @@ -78,7 +78,6 @@ class _ZonePageState extends CommonPageState if (item is HotVideoItemModel) { return VideoCardH( videoItem: item, - showPubdate: true, onRemove: () => controller.loadingState ..value.data!.removeAt(index) ..refresh(), diff --git a/lib/pages/search_panel/all/view.dart b/lib/pages/search_panel/all/view.dart index 862a12c00..e8745fbc1 100644 --- a/lib/pages/search_panel/all/view.dart +++ b/lib/pages/search_panel/all/view.dart @@ -55,7 +55,6 @@ class _SearchAllPanelState height: 120, child: VideoCardH( videoItem: item, - showPubdate: true, ), ), List() => item.length == 1 diff --git a/lib/pages/search_panel/video/view.dart b/lib/pages/search_panel/video/view.dart index 77416db01..ade15761e 100644 --- a/lib/pages/search_panel/video/view.dart +++ b/lib/pages/search_panel/video/view.dart @@ -112,7 +112,6 @@ class _SearchVideoPanelState extends CommonSearchPanelState controller.loadingState ..value.data!.removeAt(index) ..refresh(), diff --git a/lib/pages/video/related/view.dart b/lib/pages/video/related/view.dart index 7310ccae7..fa5c5b0a0 100644 --- a/lib/pages/video/related/view.dart +++ b/lib/pages/video/related/view.dart @@ -52,7 +52,6 @@ class _RelatedVideoPanelState extends State (context, index) { return VideoCardH( videoItem: response[index], - showPubdate: true, onRemove: () => _relatedController.loadingState ..value.data!.removeAt(index) ..refresh(),