From fdbe67a1240f4f115ff691b4719ecf076ce59bd4 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Sun, 6 Mar 2022 20:09:50 +0100 Subject: [PATCH 1/2] Mobile client --- mobile/lib/aeris.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/mobile/lib/aeris.dart b/mobile/lib/aeris.dart index 10be6dd3..1528d6b8 100644 --- a/mobile/lib/aeris.dart +++ b/mobile/lib/aeris.dart @@ -37,5 +37,4 @@ export "src/widgets/action_form.dart"; export "src/widgets/overlayed_texts.dart"; export "src/widgets/clickable_card.dart"; export "src/widgets/pipeline_card.dart"; -export "src/widgets/action_card.dart"; export "src/widgets/setup_api_route.dart"; From 4b108d543cdb5a5fb0ee867b057e997a404c0408 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Sun, 6 Mar 2022 21:28:13 +0100 Subject: [PATCH 2/2] Mobile Client: timeout --- mobile/lib/src/aeris_api.dart | 7 +++++-- mobile/lib/src/views/login_page.dart | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mobile/lib/src/aeris_api.dart b/mobile/lib/src/aeris_api.dart index 5cebb725..015b2e7f 100644 --- a/mobile/lib/src/aeris_api.dart +++ b/mobile/lib/src/aeris_api.dart @@ -65,8 +65,11 @@ class AerisAPI { } Future createConnectionFromService(Service service, String code) async { + final serviceName = service == const Service.youtube() + ? "google" + : service.name.toLowerCase(); http.Response response = await _requestAPI( - '/auth/${service.name.toLowerCase()}/signin?code=$code', + '/auth/$serviceName/signin?code=$code', AerisAPIRequestType.post, {}); if (!response.ok) { return false; @@ -220,7 +223,7 @@ class AerisAPI { if (_connected) { header.addAll({'Authorization': 'Bearer $_jwt'}); } - const duration = Duration(seconds: 3); + const duration = Duration(seconds: 10); try { switch (requestType) { case AerisAPIRequestType.delete: diff --git a/mobile/lib/src/views/login_page.dart b/mobile/lib/src/views/login_page.dart index 81021d53..999152e3 100644 --- a/mobile/lib/src/views/login_page.dart +++ b/mobile/lib/src/views/login_page.dart @@ -77,7 +77,7 @@ class LoginPage extends StatelessWidget { label: service.name, callback: () async { await launch(Uri.parse(service.authSignInUrl).toString(), forceSafariVC: false); - return Future.delayed(Duration(seconds: 3)).then((value) { + return Future.delayed(Duration(seconds: 8)).then((value) { return GetIt.I().isConnected ? null : AppLocalizations.of(context).cantSignInFromService; }); }