mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: list sheet
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -78,7 +78,7 @@ class _ListSheetContentState extends State<ListSheetContent>
|
|||||||
// jump to current
|
// jump to current
|
||||||
if (_ctr != null && widget.index != _ctr?.index) {
|
if (_ctr != null && widget.index != _ctr?.index) {
|
||||||
_ctr?.animateTo(_index);
|
_ctr?.animateTo(_index);
|
||||||
Future.delayed(const Duration(milliseconds: 225)).then((_) {
|
Future.delayed(const Duration(milliseconds: 255)).then((_) {
|
||||||
jumpToCurrent();
|
jumpToCurrent();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -89,7 +89,7 @@ class _ListSheetContentState extends State<ListSheetContent>
|
|||||||
int get _currentIndex => max(
|
int get _currentIndex => max(
|
||||||
0,
|
0,
|
||||||
_isList
|
_isList
|
||||||
? widget.season.sections[_ctr?.index].episodes
|
? widget.season.sections[_index].episodes
|
||||||
.indexWhere((e) => e.cid == widget.currentCid)
|
.indexWhere((e) => e.cid == widget.currentCid)
|
||||||
: episodes.indexWhere((e) => e.cid == widget.currentCid));
|
: episodes.indexWhere((e) => e.cid == widget.currentCid));
|
||||||
|
|
||||||
@@ -359,7 +359,7 @@ class _ListSheetContentState extends State<ListSheetContent>
|
|||||||
),
|
),
|
||||||
if (widget.season != null)
|
if (widget.season != null)
|
||||||
_mediumButton(
|
_mediumButton(
|
||||||
tooltip: '倒叙播放',
|
tooltip: '倒序播放',
|
||||||
icon: Icons.u_turn_right,
|
icon: Icons.u_turn_right,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// jump to current
|
// jump to current
|
||||||
@@ -375,13 +375,6 @@ class _ListSheetContentState extends State<ListSheetContent>
|
|||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
widget.onReverse?.call();
|
widget.onReverse?.call();
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
try {
|
|
||||||
itemScrollController[_ctr?.index ?? 0].jumpTo(
|
|
||||||
index: currentIndex,
|
|
||||||
);
|
|
||||||
} catch (_) {}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
|||||||
Reference in New Issue
Block a user