From bf2c0b2d049543398add7299e39d5200ea7b59be Mon Sep 17 00:00:00 2001 From: Shawn Date: Thu, 11 Jan 2024 10:22:23 -0700 Subject: [PATCH] Fix for #158: Add kIsWeb check to instances where we want android-specific behaviors. --- lib/logic/app_logic.dart | 2 +- lib/ui/common/utils/app_haptics.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logic/app_logic.dart b/lib/logic/app_logic.dart index ee65f307..810cb6ca 100644 --- a/lib/logic/app_logic.dart +++ b/lib/logic/app_logic.dart @@ -53,7 +53,7 @@ class AppLogic { await AppBitmaps.init(); // Set preferred refresh rate to the max possible (the OS may ignore this) - if (PlatformInfo.isAndroid) { + if (!kIsWeb && PlatformInfo.isAndroid) { await FlutterDisplayMode.setHighRefreshRate(); } diff --git a/lib/ui/common/utils/app_haptics.dart b/lib/ui/common/utils/app_haptics.dart index 908bb523..cb3dc8ee 100644 --- a/lib/ui/common/utils/app_haptics.dart +++ b/lib/ui/common/utils/app_haptics.dart @@ -12,7 +12,7 @@ class AppHaptics { static void buttonPress() { // Android/Fuchsia expect haptics on all button presses, iOS does not. - if (PlatformInfo.isAndroid) { + if (!kIsWeb && PlatformInfo.isAndroid) { lightImpact(); } }