From 9029825d313162158a69125f49b2ec6b969a40c5 Mon Sep 17 00:00:00 2001 From: 4sterisk <4sterisk@ymail.ne.jp> Date: Thu, 21 Nov 2024 04:23:23 +0900 Subject: [PATCH] =?UTF-8?q?Chore=20#686=20=E8=AA=8D=E8=A8=BC=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=92=E6=8A=BC=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D?= =?UTF-8?q?=E3=81=AB=E3=82=A4=E3=83=B3=E3=82=B8=E3=82=B1=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=83=BC=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/view/login_page/mi_auth_login.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/view/login_page/mi_auth_login.dart b/lib/view/login_page/mi_auth_login.dart index 3ebbe847f..81b6d892e 100644 --- a/lib/view/login_page/mi_auth_login.dart +++ b/lib/view/login_page/mi_auth_login.dart @@ -76,12 +76,18 @@ class MiAuthLogin extends HookConsumerWidget { Container(), ElevatedButton( onPressed: () async { - await ref - .read(accountRepositoryProvider.notifier) - .openMiAuth(toAscii(serverController.text)) - .expectFailure(context); - isAuthed.value = true; - + try { + IndicatorView.showIndicator(context); + await ref + .read(accountRepositoryProvider.notifier) + .openMiAuth(toAscii(serverController.text)) + .expectFailure(context); + } catch (e) { + rethrow; + } finally { + IndicatorView.hideIndicator(context); + } + isAuthed.value = true; }, child: Text( isAuthed.value