Skip to content

Commit

Permalink
Merge pull request #2359 from acterglobal/ben-only-show-bug-reporter-…
Browse files Browse the repository at this point in the history
…when-shaken-in-foreground

Only Activate the ShakeDetector bugReporter while the app is in Foregroun
  • Loading branch information
gnunicorn authored Nov 10, 2024
2 parents d4329fe + d8e4e4c commit 299cbfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changes/2359-background-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix: ignore rageshake while the app is backgrounded to avoid starting up with a bug report screen opened
5 changes: 4 additions & 1 deletion app/lib/config/app_shell.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:acter/common/providers/app_state_provider.dart';
import 'package:acter/common/providers/common_providers.dart';
import 'package:acter/common/tutorial_dialogs/bottom_navigation_tutorials/bottom_navigation_tutorials.dart';
import 'package:acter/common/utils/constants.dart';
Expand Down Expand Up @@ -71,7 +72,9 @@ class AppShellState extends ConsumerState<AppShell> {
detector = ShakeDetector.autoStart(
shakeThresholdGravity: 30.0,
onShake: () {
openBugReport(context);
if (ref.read(isAppInForeground)) {
openBugReport(context);
}
},
);
}
Expand Down

0 comments on commit 299cbfa

Please sign in to comment.