Delete Sentry

This commit is contained in:
Inex Code 2020-10-03 21:38:40 +03:00
parent 16df5c123d
commit e050ca307a
4 changed files with 0 additions and 42 deletions

View file

@ -9,15 +9,12 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:localstorage/localstorage.dart';
import 'package:sentry/sentry.dart';
import 'package:universal_html/prefer_universal/html.dart' as html;
import 'components/matrix.dart';
import 'components/theme_switcher.dart';
import 'views/chat_list.dart';
final sentry = SentryClient(dsn: '8591d0d863b646feb4f3dda7e5dcab38');
void main() {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
@ -28,12 +25,6 @@ void main() {
await storage.ready;
debugPrint(error.toString());
debugPrint(stackTrace.toString());
if (storage.getItem('sentry') == true) {
await sentry.captureException(
exception: error,
stackTrace: stackTrace,
);
}
},
);
}

View file

@ -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;
}
}

View file

@ -4,7 +4,6 @@ import 'package:bot_toast/bot_toast.dart';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:fluffychat/components/settings_themes.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_ignore_list.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),
ListTile(
trailing: Icon(Icons.vpn_key),

View file

@ -65,7 +65,6 @@ dependencies:
url: https://gitlab.com/famedly/libraries/native_imaging.git
ref: master
flutter_blurhash: ^0.5.0
sentry: ">=3.0.0 <4.0.0"
scroll_to_index: ^1.0.6
dev_dependencies: