Skip to content

Commit

Permalink
fix: app端推荐屏蔽时间显示,播放量与弹幕组件改为动态类型
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Jan 20, 2024
1 parent e3fd70d commit be0a27b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/common/widgets/stat/danmu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion lib/common/widgets/stat/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
28 changes: 15 additions & 13 deletions lib/common/widgets/video_card_v.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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) ...<Widget>[
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),
]
],
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/recommend_filter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'dart:math';
// import 'dart:math';

import 'storage.dart';

Expand Down

0 comments on commit be0a27b

Please sign in to comment.