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