Delete Sentry
This commit is contained in:
parent
16df5c123d
commit
e050ca307a
|
@ -9,15 +9,12 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:localstorage/localstorage.dart';
|
import 'package:localstorage/localstorage.dart';
|
||||||
import 'package:sentry/sentry.dart';
|
|
||||||
import 'package:universal_html/prefer_universal/html.dart' as html;
|
import 'package:universal_html/prefer_universal/html.dart' as html;
|
||||||
|
|
||||||
import 'components/matrix.dart';
|
import 'components/matrix.dart';
|
||||||
import 'components/theme_switcher.dart';
|
import 'components/theme_switcher.dart';
|
||||||
import 'views/chat_list.dart';
|
import 'views/chat_list.dart';
|
||||||
|
|
||||||
final sentry = SentryClient(dsn: '8591d0d863b646feb4f3dda7e5dcab38');
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
SystemChrome.setSystemUIOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
|
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
|
||||||
|
@ -28,12 +25,6 @@ void main() {
|
||||||
await storage.ready;
|
await storage.ready;
|
||||||
debugPrint(error.toString());
|
debugPrint(error.toString());
|
||||||
debugPrint(stackTrace.toString());
|
debugPrint(stackTrace.toString());
|
||||||
if (storage.getItem('sentry') == true) {
|
|
||||||
await sentry.captureException(
|
|
||||||
exception: error,
|
|
||||||
stackTrace: stackTrace,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
import 'package:bot_toast/bot_toast.dart';
|
|
||||||
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|
||||||
import 'package:localstorage/localstorage.dart';
|
|
||||||
|
|
||||||
abstract class SentryController {
|
|
||||||
static LocalStorage storage = LocalStorage('LocalStorage');
|
|
||||||
static Future<void> toggleSentryAction(BuildContext context) async {
|
|
||||||
final enableSentry = await SimpleDialogs(context).askConfirmation(
|
|
||||||
titleText: L10n.of(context).sendBugReports,
|
|
||||||
contentText: L10n.of(context).sentryInfo,
|
|
||||||
confirmText: L10n.of(context).ok,
|
|
||||||
cancelText: L10n.of(context).no,
|
|
||||||
);
|
|
||||||
await storage.ready;
|
|
||||||
await storage.setItem('sentry', enableSentry);
|
|
||||||
BotToast.showText(text: L10n.of(context).changesHaveBeenSaved);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Future<bool> getSentryStatus() async {
|
|
||||||
await storage.ready;
|
|
||||||
return storage.getItem('sentry') as bool;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -4,7 +4,6 @@ import 'package:bot_toast/bot_toast.dart';
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:fluffychat/components/settings_themes.dart';
|
import 'package:fluffychat/components/settings_themes.dart';
|
||||||
import 'package:fluffychat/config/app_config.dart';
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
|
||||||
import 'package:fluffychat/views/settings_devices.dart';
|
import 'package:fluffychat/views/settings_devices.dart';
|
||||||
import 'package:fluffychat/views/settings_ignore_list.dart';
|
import 'package:fluffychat/views/settings_ignore_list.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
@ -401,11 +400,6 @@ class _SettingsState extends State<Settings> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListTile(
|
|
||||||
trailing: Icon(Icons.bug_report),
|
|
||||||
title: Text(L10n.of(context).sendBugReports),
|
|
||||||
onTap: () => SentryController.toggleSentryAction(context),
|
|
||||||
),
|
|
||||||
Divider(thickness: 1),
|
Divider(thickness: 1),
|
||||||
ListTile(
|
ListTile(
|
||||||
trailing: Icon(Icons.vpn_key),
|
trailing: Icon(Icons.vpn_key),
|
||||||
|
|
|
@ -65,7 +65,6 @@ dependencies:
|
||||||
url: https://gitlab.com/famedly/libraries/native_imaging.git
|
url: https://gitlab.com/famedly/libraries/native_imaging.git
|
||||||
ref: master
|
ref: master
|
||||||
flutter_blurhash: ^0.5.0
|
flutter_blurhash: ^0.5.0
|
||||||
sentry: ">=3.0.0 <4.0.0"
|
|
||||||
scroll_to_index: ^1.0.6
|
scroll_to_index: ^1.0.6
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
Loading…
Reference in New Issue