mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: app端推荐添加时间显示(测试)
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../models/home/rcmd/result.dart';
|
||||
import '../../models/model_rec_video_item.dart';
|
||||
import 'stat/danmu.dart';
|
||||
import 'stat/view.dart';
|
||||
@@ -332,6 +333,27 @@ class VideoStat extends StatelessWidget {
|
||||
Utils.formatTimestampToRelativeTime(videoItem.pubdate)),
|
||||
)),
|
||||
const SizedBox(width: 2),
|
||||
],
|
||||
if (videoItem is RecVideoItemAppModel &&
|
||||
videoItem.desc != null &&
|
||||
videoItem.desc.contains(' · ')) ...<Widget>[
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
flex: 0,
|
||||
child: RichText(
|
||||
maxLines: 1,
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.labelSmall!.fontSize,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline
|
||||
.withOpacity(0.8),
|
||||
),
|
||||
text: Utils.shortenChineseDateString(videoItem.desc.split(' · ').last)),
|
||||
)),
|
||||
const SizedBox(width: 2),
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user