diff --git a/lib/common/widgets/stat/danmu.dart b/lib/common/widgets/stat/danmu.dart index 44f662a9..c1c439db 100644 --- a/lib/common/widgets/stat/danmu.dart +++ b/lib/common/widgets/stat/danmu.dart @@ -3,7 +3,7 @@ import 'package:pilipala/utils/utils.dart'; class StatDanMu extends StatelessWidget { final String? theme; - final int? danmu; + final dynamic danmu; final String? size; const StatDanMu({Key? key, this.theme, this.danmu, this.size}) diff --git a/lib/common/widgets/stat/view.dart b/lib/common/widgets/stat/view.dart index 8b97b605..2665e2d4 100644 --- a/lib/common/widgets/stat/view.dart +++ b/lib/common/widgets/stat/view.dart @@ -3,7 +3,7 @@ import 'package:pilipala/utils/utils.dart'; class StatView extends StatelessWidget { final String? theme; - final int? view; + final dynamic view; final String? size; const StatView({Key? key, this.theme, this.view, this.size}) diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index c1d0ba63..43dd05ca 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; +import '../../models/model_rec_video_item.dart'; import 'stat/danmu.dart'; import 'stat/view.dart'; import '../../http/dynamics.dart'; @@ -328,25 +329,26 @@ class VideoStat extends StatelessWidget { children: [ StatView( theme: 'gray', - view: videoItem.stat.view as int, + view: videoItem.stat.view, ), const SizedBox(width: 8), StatDanMu( theme: 'gray', - danmu: videoItem.stat.danmu as int, + danmu: videoItem.stat.danmu, ), - const Spacer(), - RichText( - maxLines: 1, - text: TextSpan( - style: TextStyle( - fontSize: Theme.of(context).textTheme.labelSmall!.fontSize, - color: Theme.of(context).colorScheme.outline, - ), - text: Utils.formatTimestampToRelativeTime(videoItem.pubdate) + if (videoItem is RecVideoItemModel) ...[ + const Spacer(), + RichText( + maxLines: 1, + text: TextSpan( + style: TextStyle( + fontSize: Theme.of(context).textTheme.labelSmall!.fontSize, + color: Theme.of(context).colorScheme.outline, + ), + text: Utils.formatTimestampToRelativeTime(videoItem.pubdate)), ), - ), - const SizedBox(width: 4), + const SizedBox(width: 4), + ] ], ); } diff --git a/lib/utils/recommend_filter.dart b/lib/utils/recommend_filter.dart index 113e2261..61e37ed3 100644 --- a/lib/utils/recommend_filter.dart +++ b/lib/utils/recommend_filter.dart @@ -1,4 +1,4 @@ -import 'dart:math'; +// import 'dart:math'; import 'storage.dart';