mod: try-catch some requests

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-12 22:17:01 +08:00
parent d996e0a7dd
commit 675932aa69
3 changed files with 54 additions and 45 deletions

View File

@@ -105,10 +105,12 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
}
void querySearchDefault() async {
var res = await Request().get(Api.searchDefault);
if (res.data['code'] == 0) {
defaultSearch.value = res.data['data']['name'];
}
try {
var res = await Request().get(Api.searchDefault);
if (res.data['code'] == 0) {
defaultSearch.value = res.data['data']['name'];
}
} catch (_) {}
}
showUserInfoDialog(context) {