diff --git a/lib/screens/dashboard/dash.dart b/lib/screens/dashboard/dash.dart index bca9dcb7..df9ce621 100644 --- a/lib/screens/dashboard/dash.dart +++ b/lib/screens/dashboard/dash.dart @@ -586,6 +586,7 @@ class _UnauthorizedCard extends HookConsumerWidget { mainAxisSize: MainAxisSize.min, children: [ const Gap(16), + const SizedBox(width: double.infinity), Icon( Symbols.dashboard_rounded, size: 64, diff --git a/lib/widgets/app_scaffold.dart b/lib/widgets/app_scaffold.dart index b6ec4cc4..ffc6f3dd 100644 --- a/lib/widgets/app_scaffold.dart +++ b/lib/widgets/app_scaffold.dart @@ -125,6 +125,8 @@ class WindowScaffold extends HookConsumerWidget { ); useEffect(() { + if (kIsWeb) return null; + hotKeyManager.register( popHotKey, keyDownHandler: (_) { @@ -632,4 +634,4 @@ class _WebSocketIndicator extends HookConsumerWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/widgets/app_wrapper.dart b/lib/widgets/app_wrapper.dart index f9faef6c..8bf5bddc 100644 --- a/lib/widgets/app_wrapper.dart +++ b/lib/widgets/app_wrapper.dart @@ -162,36 +162,38 @@ class AppWrapper extends HookConsumerWidget { (now.day >= 22 && now.day <= 28); useEffect(() { - final now = DateTime.now(); - if (doesShowSnow) { - isShowSnow.value = true; - Future.delayed(const Duration(seconds: 60), () { - if (!context.mounted) return; - isShowSnow.value = false; - Future.delayed(const Duration(seconds: 3), () { + Future(() { + final now = DateTime.now(); + if (doesShowSnow) { + isShowSnow.value = true; + Future.delayed(const Duration(seconds: 60), () { if (!context.mounted) return; - isSnowGone.value = true; + isShowSnow.value = false; + Future.delayed(const Duration(seconds: 3), () { + if (!context.mounted) return; + isSnowGone.value = true; + }); }); - }); - } - - if (settings.firstLaunchAt == null) { - settingsNotifier.setFirstLaunchAt(now.toIso8601String()); - } else if (!settings.askedReview) { - final launchAt = DateTime.parse(settings.firstLaunchAt!); - final daysSinceFirstLaunch = now.difference(launchAt).inDays; - if (daysSinceFirstLaunch >= 3 && - !kIsWeb && - (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) { - final InAppReview inAppReview = InAppReview.instance; - Future(() async { - if (await inAppReview.isAvailable()) { - inAppReview.requestReview(); - } - }); - settingsNotifier.setAskedReview(true); } - } + + if (settings.firstLaunchAt == null) { + settingsNotifier.setFirstLaunchAt(now.toIso8601String()); + } else if (!settings.askedReview) { + final launchAt = DateTime.parse(settings.firstLaunchAt!); + final daysSinceFirstLaunch = now.difference(launchAt).inDays; + if (daysSinceFirstLaunch >= 3 && + !kIsWeb && + (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) { + final InAppReview inAppReview = InAppReview.instance; + Future(() async { + if (await inAppReview.isAvailable()) { + inAppReview.requestReview(); + } + }); + settingsNotifier.setAskedReview(true); + } + } + }); return null; }, []); diff --git a/lib/widgets/extended_refresh_indicator.dart b/lib/widgets/extended_refresh_indicator.dart index 0e195e58..6ab4f069 100644 --- a/lib/widgets/extended_refresh_indicator.dart +++ b/lib/widgets/extended_refresh_indicator.dart @@ -38,6 +38,8 @@ class ExtendedRefreshIndicator extends HookConsumerWidget { ); useEffect(() { + if (kIsWeb) return null; + hotKeyManager.register( refreshHotKey, keyDownHandler: (_) {