Skip to content

Commit

Permalink
Reenable Sentry on web
Browse files Browse the repository at this point in the history
  • Loading branch information
dhzdhd committed Nov 14, 2023
1 parent 48e6b84 commit 5f87ca4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void main() async {
runApp(const ProviderScope(child: MyApp()));

// LeakTracking.stop();
} else if (!kIsWeb && getSentryFromStorage()) {
} else if (getSentryFromStorage()) {
await SentryFlutter.init(
(options) {
options.dsn =
Expand Down
23 changes: 10 additions & 13 deletions lib/src/settings/views/settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,14 @@ class SettingsView extends HookConsumerWidget {
await settingsNotifier.setFloatingRunVisibility();
}),
),
Visibility(
visible: !kIsWeb,
child: ListTile(
leading: const Icon(Icons.monitor_heart_outlined),
title: const Text('Enable Sentry'),
trailing: Switch(
value: isSentryEnabled,
onChanged: (val) async {
await settingsNotifier.setSentry();
}),
),
ListTile(
leading: const Icon(Icons.monitor_heart_outlined),
title: const Text('Enable Sentry'),
trailing: Switch(
value: isSentryEnabled,
onChanged: (val) async {
await settingsNotifier.setSentry();
}),
),
const Gap(10),
const Divider(),
Expand Down Expand Up @@ -270,8 +267,8 @@ class SettingsView extends HookConsumerWidget {
),
const Gap(10),
ElevatedButton(
onPressed: () {
showDialog(
onPressed: () async {
await showDialog(
context: context,
builder: (BuildContext ctx) {
return const ClearDialogWidget();
Expand Down

0 comments on commit 5f87ca4

Please sign in to comment.