mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 17:46:24 +08:00
feat: match info
opt dateformat Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -11,6 +11,8 @@ import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models/model_hot_video_item.dart';
|
||||
import 'package:PiliPlus/models/model_video.dart';
|
||||
import 'package:PiliPlus/models/search/result.dart';
|
||||
import 'package:PiliPlus/utils/date_util.dart';
|
||||
import 'package:PiliPlus/utils/duration_util.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -138,7 +140,7 @@ class VideoCardH extends StatelessWidget {
|
||||
PBadge(
|
||||
text: progress == -1
|
||||
? '已看完'
|
||||
: '${Utils.timeFormat(progress)}/${Utils.timeFormat(videoItem.duration)}',
|
||||
: '${DurationUtil.formatDuration(progress)}/${DurationUtil.formatDuration(videoItem.duration)}',
|
||||
right: 6,
|
||||
bottom: 8,
|
||||
type: PBadgeType.gray,
|
||||
@@ -155,7 +157,8 @@ class VideoCardH extends StatelessWidget {
|
||||
)
|
||||
] else if (videoItem.duration > 0)
|
||||
PBadge(
|
||||
text: Utils.timeFormat(videoItem.duration),
|
||||
text: DurationUtil.formatDuration(
|
||||
videoItem.duration),
|
||||
right: 6.0,
|
||||
bottom: 6.0,
|
||||
type: PBadgeType.gray,
|
||||
@@ -194,9 +197,7 @@ class VideoCardH extends StatelessWidget {
|
||||
|
||||
Widget content(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
String pubdate = showPubdate
|
||||
? Utils.dateFormat(videoItem.pubdate!, formatType: 'day')
|
||||
: '';
|
||||
String pubdate = showPubdate ? DateUtil.dateFormat(videoItem.pubdate!) : '';
|
||||
if (pubdate != '') pubdate += ' ';
|
||||
return Expanded(
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user