mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-17 23:56:13 +08:00
fix: video tabbar index
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1196,8 +1196,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
if (_shouldShowSeasonPanel) '播放列表',
|
if (_shouldShowSeasonPanel) '播放列表',
|
||||||
];
|
];
|
||||||
if (videoDetailController.tabCtr.length != tabs.length) {
|
if (videoDetailController.tabCtr.length != tabs.length) {
|
||||||
videoDetailController.tabCtr =
|
videoDetailController.tabCtr = TabController(
|
||||||
TabController(length: tabs.length, vsync: this);
|
vsync: this,
|
||||||
|
length: tabs.length,
|
||||||
|
initialIndex: tabs.length > videoDetailController.tabCtr.length
|
||||||
|
? videoDetailController.tabCtr.index
|
||||||
|
: 0,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget tabbar() => TabBar(
|
Widget tabbar() => TabBar(
|
||||||
|
|||||||
Reference in New Issue
Block a user