From 3807cf2038a67519080e42edefbc78184a2fb1a0 Mon Sep 17 00:00:00 2001 From: Ryotaro Onoue <73390859+YumNumm@users.noreply.github.com> Date: Tue, 5 Dec 2023 02:08:13 +0900 Subject: [PATCH] =?UTF-8?q?[Android]=20KmoniStatus=E3=81=AEProgressIndicat?= =?UTF-8?q?or=E3=81=AE=E3=82=B5=E3=82=A4=E3=82=BA=E8=AA=BF=E6=95=B4=20(#44?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/component/sheet/status_widget.dart | 16 +++++++++++++--- .../telegram_ws/provider/telegram_socket_io.dart | 10 ++++++++-- lib/feature/settings/settings_screen.dart | 11 +++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/lib/feature/home/component/sheet/status_widget.dart b/lib/feature/home/component/sheet/status_widget.dart index 8edb73a98..023bc6d1c 100644 --- a/lib/feature/home/component/sheet/status_widget.dart +++ b/lib/feature/home/component/sheet/status_widget.dart @@ -104,8 +104,12 @@ class SheetStatusWidget extends ConsumerWidget { ), ), ), - const SizedBox(width: 4), - const CircularProgressIndicator.adaptive(), + const SizedBox(width: 8), + const SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator.adaptive(), + ), ], _ when isInitialized && @@ -136,7 +140,13 @@ class SheetStatusWidget extends ConsumerWidget { ), ), ], - _ => [const CircularProgressIndicator.adaptive()], + _ => [ + const SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator.adaptive(), + ), + ], }, ], ), diff --git a/lib/feature/home/features/telegram_ws/provider/telegram_socket_io.dart b/lib/feature/home/features/telegram_ws/provider/telegram_socket_io.dart index c6ae144c0..1309cdf05 100644 --- a/lib/feature/home/features/telegram_ws/provider/telegram_socket_io.dart +++ b/lib/feature/home/features/telegram_ws/provider/telegram_socket_io.dart @@ -20,6 +20,7 @@ Socket telegramSocketIo(TelegramSocketIoRef ref) { OptionBuilder() .setTransports(['websocket']) .enableReconnection() + .enableAutoConnect() .enableForceNew() .setQuery({'key': authorization}) .build(), @@ -37,8 +38,13 @@ Socket telegramSocketIo(TelegramSocketIoRef ref) { // 再接続 }) ..onAny((event, data) { - talker.logTyped(TelegramWebSocketLog('Event: $event ($data)')); - log('Event: $event ($data)'); + talker.logTyped( + TelegramWebSocketLog( + 'Event: $event ($data)' + .replaceAll(url, '**') + .replaceAll(authorization, '++'), + ), + ); }) ..onPing((data) { log('Ping: $data'); diff --git a/lib/feature/settings/settings_screen.dart b/lib/feature/settings/settings_screen.dart index 34fd53730..f242094f4 100644 --- a/lib/feature/settings/settings_screen.dart +++ b/lib/feature/settings/settings_screen.dart @@ -130,10 +130,13 @@ class SettingsScreen extends HookConsumerWidget { ), ), Center( - child: Text( - 'EQMonitor v${packageInfo.version} (${packageInfo.buildNumber})', - style: textTheme.bodySmall!.copyWith( - color: theme.colorScheme.onSurface.withOpacity(0.8), + child: Padding( + padding: const EdgeInsets.only(bottom: 16), + child: Text( + 'EQMonitor v${packageInfo.version} (${packageInfo.buildNumber})', + style: textTheme.bodySmall!.copyWith( + color: theme.colorScheme.onSurface.withOpacity(0.8), + ), ), ), ),