mod: try-catch itemscrollctr jump

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-26 11:27:49 +08:00
parent eee7eda1a2
commit 5664447e15
4 changed files with 40 additions and 35 deletions

View File

@@ -42,7 +42,9 @@ class _MediaListPanelState extends State<MediaListPanel> {
int index =
widget.mediaList.indexWhere((item) => item.bvid == widget.bvid);
if (index != -1 && index != 0) {
_scrollController.jumpTo(index: index);
try {
_scrollController.jumpTo(index: index);
} catch (_) {}
}
});
}