Поправил отзывчивость кнопок валют на экране валюты, исправил отображение названий валюты на экранах проведения покупки (рубль, рубля, рублей) для русской локали
This commit is contained in:
@@ -20,7 +20,20 @@ class SplashScreen extends StatefulWidget {
|
||||
|
||||
class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
|
||||
@override Widget getMainWidget() {
|
||||
@override Widget build(BuildContext ctx) {
|
||||
if (helper == null) {
|
||||
helper = new SqliteHelper();
|
||||
helper.open().then((_) {
|
||||
if (app == null) {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
app = flavor;
|
||||
setState(() {
|
||||
onStart();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return getScreenContent();
|
||||
}
|
||||
|
||||
@@ -110,10 +123,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
checkTokenStatus(token).then((statusResponse) {
|
||||
handleStatusResponse(statusResponse, helper);
|
||||
}).catchError((error) {
|
||||
helper.close().then((_) {
|
||||
print(error.toString());
|
||||
return false;
|
||||
});
|
||||
handleError(error.toString());
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -157,12 +167,13 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
|
||||
createToken(merchantID, posID).then((response) {
|
||||
if (response.statusCode == 409) {
|
||||
helper.close();
|
||||
pushRouteReplacement(context, new FinishRegistrationScreen());
|
||||
pushRouteReplacement(context, new FinishRegistrationScreen(helper, app));
|
||||
} else if (response.statusCode == 201) {
|
||||
clearToken(response, helper);
|
||||
}
|
||||
}).catchError((error) => print(error.toString()));
|
||||
}).catchError((error) {
|
||||
handleError(error.toString());
|
||||
});
|
||||
}
|
||||
|
||||
/// Очищаем бд, делаем запрос на удаление токена.
|
||||
@@ -173,9 +184,16 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
||||
Navigator.of(context).pop();
|
||||
pushRouteReplacement(context, new RegistrationScreen(helper, app));
|
||||
}).catchError((error) {
|
||||
helper.close();
|
||||
print(error.toString());
|
||||
handleError(error.toString());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/// Закрываем соединение, логируем ошибку.
|
||||
void handleError(String error) {
|
||||
helper.close().then((_) {
|
||||
print(error.toString());
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user