mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-03 08:39:46 +08:00
show co/charging label
fix special dm Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -57,6 +57,9 @@ class PlDanmakuController {
|
||||
|
||||
final shouldFilter = plPlayerController.filters.count != 0;
|
||||
for (final element in data.elems) {
|
||||
if (element.mode == 7 && !plPlayerController.showSpecialDanmaku) {
|
||||
continue;
|
||||
}
|
||||
if (accountService.isLogin.value) {
|
||||
element.isSelf = element.midHash == plPlayerController.midHash;
|
||||
}
|
||||
|
||||
@@ -340,6 +340,7 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel> {
|
||||
int? pubdate;
|
||||
int? view;
|
||||
int? danmaku;
|
||||
bool? isCharging;
|
||||
|
||||
switch (episode) {
|
||||
case Part part:
|
||||
@@ -356,6 +357,9 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel> {
|
||||
pubdate = item.arc?.pubdate;
|
||||
view = item.arc?.stat?.view;
|
||||
danmaku = item.arc?.stat?.danmaku;
|
||||
if (item.attribute == 8) {
|
||||
isCharging = true;
|
||||
}
|
||||
break;
|
||||
case pgc.EpisodeItem item:
|
||||
bvid = item.bvid;
|
||||
@@ -445,7 +449,14 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel> {
|
||||
bottom: 6.0,
|
||||
type: PBadgeType.gray,
|
||||
),
|
||||
if (episode.badge != null)
|
||||
if (isCharging == true)
|
||||
const PBadge(
|
||||
text: '充电专属',
|
||||
top: 6,
|
||||
right: 6,
|
||||
type: PBadgeType.error,
|
||||
)
|
||||
else if (episode.badge != null)
|
||||
PBadge(
|
||||
text: episode.badge,
|
||||
top: 6,
|
||||
|
||||
@@ -101,6 +101,12 @@ class VideoCardHLater extends StatelessWidget {
|
||||
right: 6.0,
|
||||
type: PBadgeType.error,
|
||||
)
|
||||
else if (videoItem.rights?.isCooperation == 1)
|
||||
const PBadge(
|
||||
text: '合作',
|
||||
top: 6.0,
|
||||
right: 6.0,
|
||||
)
|
||||
else if (videoItem.pgcLabel != null)
|
||||
PBadge(
|
||||
text: videoItem.pgcLabel,
|
||||
|
||||
Reference in New Issue
Block a user