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() {
int index = tabController.index;
var ctr = tabsCtrList[index];
ctr().onRefresh();
try {
int index = tabController.index;
var ctr = tabsCtrList[index];
ctr().onRefresh();
} catch (_) {}
}
void animateToTop() {
int index = tabController.index;
var ctr = tabsCtrList[index];
ctr().animateToTop();
try {
int index = tabController.index;
var ctr = tabsCtrList[index];
ctr().animateToTop();
} catch (_) {}
}
// 更新登录状态