fix: part: jump to curr

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-18 21:47:18 +08:00
parent d86caac189
commit d0ebedac0a
2 changed files with 4 additions and 1 deletions

View File

@@ -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) {

View File

@@ -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,