mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: part: jump to curr
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -35,7 +35,7 @@ class LiveController
|
||||
late RxInt liveCount = 0.obs;
|
||||
|
||||
Future fetchLiveFollowing([bool isRefresh = true]) async {
|
||||
if (isRefresh.not && followEnd) {
|
||||
if (!isLogin.value || (isRefresh.not && followEnd)) {
|
||||
return;
|
||||
}
|
||||
if (isRefresh) {
|
||||
|
||||
@@ -64,6 +64,9 @@ class _PagesPanelState extends State<PagesPanel> {
|
||||
}
|
||||
|
||||
void jumpToCurr() {
|
||||
if (!_scrollController.hasClients || pages.isEmpty) {
|
||||
return;
|
||||
}
|
||||
const double itemWidth = 150; // 每个列表项的宽度
|
||||
final double targetOffset = (pageIndex * itemWidth - itemWidth / 2).clamp(
|
||||
_scrollController.position.minScrollExtent,
|
||||
|
||||
Reference in New Issue
Block a user