mod: home: try-catch ctr

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-27 20:23:55 +08:00
parent fedb67c809
commit 7fab59acd2

View File

@@ -50,15 +50,19 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
} }
void onRefresh() { void onRefresh() {
int index = tabController.index; try {
var ctr = tabsCtrList[index]; int index = tabController.index;
ctr().onRefresh(); var ctr = tabsCtrList[index];
ctr().onRefresh();
} catch (_) {}
} }
void animateToTop() { void animateToTop() {
int index = tabController.index; try {
var ctr = tabsCtrList[index]; int index = tabController.index;
ctr().animateToTop(); var ctr = tabsCtrList[index];
ctr().animateToTop();
} catch (_) {}
} }
// 更新登录状态 // 更新登录状态