mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 番剧集数错误、合集最后一集不显示
This commit is contained in:
@@ -88,7 +88,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
title: Text(
|
title: Text(
|
||||||
'第${index + 1}话 ${page.longTitle!}',
|
'第' + (page.title ?? '${index + 1}') + '话 ${page.longTitle!}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: isCurrentIndex
|
color: isCurrentIndex
|
||||||
@@ -96,13 +96,13 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
: Theme.of(context).colorScheme.onSurface,
|
: Theme.of(context).colorScheme.onSurface,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
trailing: page.badge != null
|
trailing: page.badge != null && page.badge == '会员'
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
'assets/images/big-vip.png',
|
'assets/images/big-vip.png',
|
||||||
height: 20,
|
height: 20,
|
||||||
semanticLabel: "大会员",
|
semanticLabel: "大会员",
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: Text(page.badge ?? ""),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,15 +147,15 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
child: ScrollablePositionedList.builder(
|
child: ScrollablePositionedList.builder(
|
||||||
itemCount: widget.pages.length,
|
itemCount: widget.pages.length + 1,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
bool isLastItem = index == widget.pages.length - 1;
|
bool isLastItem = index == widget.pages.length;
|
||||||
bool isCurrentIndex = currentIndex == index;
|
bool isCurrentIndex = currentIndex == index;
|
||||||
return isLastItem
|
return isLastItem
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height:
|
height:
|
||||||
MediaQuery.of(context).padding.bottom +
|
MediaQuery.of(context).padding.bottom +
|
||||||
20,
|
50,
|
||||||
)
|
)
|
||||||
: buildPageListItem(
|
: buildPageListItem(
|
||||||
widget.pages[index],
|
widget.pages[index],
|
||||||
@@ -271,7 +271,9 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
const SizedBox(width: 6)
|
const SizedBox(width: 6)
|
||||||
],
|
],
|
||||||
Text(
|
Text(
|
||||||
'第${i + 1}话',
|
'第' +
|
||||||
|
(widget.pages[i].title ?? "${i + 1}") +
|
||||||
|
'话',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: i == currentIndex
|
color: i == currentIndex
|
||||||
@@ -282,6 +284,7 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
if (widget.pages[i].badge != null) ...[
|
if (widget.pages[i].badge != null) ...[
|
||||||
|
const Spacer(),
|
||||||
if (widget.pages[i].badge == '会员') ...[
|
if (widget.pages[i].badge == '会员') ...[
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/big-vip.png',
|
'assets/images/big-vip.png',
|
||||||
@@ -290,7 +293,6 @@ class _BangumiPanelState extends State<BangumiPanel> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
if (widget.pages[i].badge != '会员') ...[
|
if (widget.pages[i].badge != '会员') ...[
|
||||||
const Spacer(),
|
|
||||||
Text(
|
Text(
|
||||||
widget.pages[i].badge!,
|
widget.pages[i].badge!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -173,9 +173,9 @@ class _SeasonPanelState extends State<SeasonPanel> {
|
|||||||
bottom: MediaQuery.of(context).padding.bottom),
|
bottom: MediaQuery.of(context).padding.bottom),
|
||||||
child: Material(
|
child: Material(
|
||||||
child: ScrollablePositionedList.builder(
|
child: ScrollablePositionedList.builder(
|
||||||
itemCount: episodes!.length,
|
itemCount: episodes!.length + 1,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
bool isLastItem = index == episodes!.length - 1;
|
bool isLastItem = index == episodes!.length;
|
||||||
bool isCurrentIndex = currentIndex == index;
|
bool isCurrentIndex = currentIndex == index;
|
||||||
return isLastItem
|
return isLastItem
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
|
|||||||
Reference in New Issue
Block a user