mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 20:16:26 +08:00
show co/charging label
fix special dm Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -38,11 +38,21 @@ class VideoCardH extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String type = 'video';
|
||||
String? badge;
|
||||
if (videoItem case SearchVideoItemModel item) {
|
||||
var typeOrNull = item.type;
|
||||
if (typeOrNull?.isNotEmpty == true) {
|
||||
type = typeOrNull!;
|
||||
}
|
||||
if (item.isUnionVideo == 1) {
|
||||
badge = '合作';
|
||||
}
|
||||
} else if (videoItem case HotVideoItemModel item) {
|
||||
if (item.isCooperation == 1) {
|
||||
badge = '合作';
|
||||
} else {
|
||||
badge = item.pgcLabel;
|
||||
}
|
||||
}
|
||||
return Material(
|
||||
type: MaterialType.transparency,
|
||||
@@ -123,9 +133,9 @@ class VideoCardH extends StatelessWidget {
|
||||
width: maxWidth,
|
||||
height: maxHeight,
|
||||
),
|
||||
if (videoItem case HotVideoItemModel item)
|
||||
if (badge != null)
|
||||
PBadge(
|
||||
text: item.pgcLabel,
|
||||
text: badge,
|
||||
top: 6.0,
|
||||
right: 6.0,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user