From cd92f927a75c6395edacdbd0884eda25528971f7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 14 Jun 2020 11:02:02 +0300 Subject: [PATCH] Handle invalid login --- lib/data/web_client.dart | 11 +++++++---- web/manifest.json | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/data/web_client.dart b/lib/data/web_client.dart index 34b20211b..76c3cb57a 100644 --- a/lib/data/web_client.dart +++ b/lib/data/web_client.dart @@ -176,12 +176,15 @@ void _checkResponse(http.Response response) { print('headers: ${response.headers}'); final version = response.headers['X-APP-VERSION']; - + + /* if (version == null) { - //throw 'Invalid version, please check v5 is installed on the server'; - } else if (!_isVersionSupported(version)) { + throw 'Invalid version, please check v5 is installed on the server'; + } else if (version != null && !_isVersionSupported(version)) { throw 'The minimum web app version is v$kMinMajorAppVersion.$kMinMinorAppVersion.$kMinPatchAppVersion'; - } else if (response.statusCode >= 400) { + } else */ + + if (response.statusCode >= 400) { print('==== FAILED ===='); throw _parseError(response.statusCode, response.body); } diff --git a/web/manifest.json b/web/manifest.json index 0ba9ae91e..95c149c4a 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -17,11 +17,11 @@ "platform": "itunes", "url": "https://testflight.apple.com/join/MJ6WpaXh" } - ] + ], "icons": [ { "src": "images/logo.png", - "sizes": "397x397", + "sizes": "512x512", "type": "image/png" } ]