Исправлено падение приложения из-за попытки сделать запрос к бд, после закрытия соединения с ней
This commit is contained in:
@@ -129,7 +129,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
getCheckTokenStatusRequest(token).then((statusResponse) {
|
||||
handleStatusResponse(statusResponse, helper);
|
||||
}).catchError((error) {
|
||||
handleError(error.toString());
|
||||
print(error.toString());
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
clearToken(response, helper);
|
||||
}
|
||||
}).catchError((error) {
|
||||
handleError(error.toString());
|
||||
print(error.toString());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -191,16 +191,8 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
Navigator.of(context).pop();
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
}).catchError((error) {
|
||||
handleError(error.toString());
|
||||
print(error.toString());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/// Закрываем соединение, логируем ошибку.
|
||||
void handleError(String error) {
|
||||
helper.close().then((_) {
|
||||
print(error.toString());
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user