chore: Remove error logging with sentry
This commit is contained in:
parent
c4ec6ebb3f
commit
84ad3b88d4
13 changed files with 9 additions and 119 deletions
|
|
@ -24,7 +24,6 @@ import 'package:vrouter/vrouter.dart';
|
|||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/utils/client_manager.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
||||
import 'package:fluffychat/utils/uia_request_manager.dart';
|
||||
import 'package:fluffychat/utils/voip_plugin.dart';
|
||||
import '../config/app_config.dart';
|
||||
|
|
@ -211,7 +210,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
}
|
||||
} catch (e, s) {
|
||||
client.onLoginStateChanged.addError(e, s);
|
||||
SentryController.captureException(e, s);
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
|
@ -273,12 +271,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
}
|
||||
}
|
||||
|
||||
void _reportSyncError(SyncStatusUpdate update) =>
|
||||
SentryController.captureException(
|
||||
update.error!.exception,
|
||||
update.error!.stackTrace,
|
||||
);
|
||||
|
||||
void _registerSubs(String name) {
|
||||
final c = getClientByName(name);
|
||||
if (c == null) {
|
||||
|
|
@ -286,9 +278,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
'Attempted to register subscriptions for non-existing client $name');
|
||||
return;
|
||||
}
|
||||
c.onSyncStatus.stream
|
||||
.where((s) => s.status == SyncStatus.error)
|
||||
.listen(_reportSyncError);
|
||||
onRoomKeyRequestSub[name] ??=
|
||||
c.onRoomKeyRequest.stream.listen((RoomKeyRequest request) async {
|
||||
if (widget.clients.any(((cl) =>
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fluffychat/utils/sentry_controller.dart';
|
||||
|
||||
class SentrySwitchListTile extends StatefulWidget {
|
||||
final String label;
|
||||
|
||||
const SentrySwitchListTile.adaptive({Key? key, required this.label})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_SentrySwitchListTileState createState() => _SentrySwitchListTileState();
|
||||
}
|
||||
|
||||
class _SentrySwitchListTileState extends State<SentrySwitchListTile> {
|
||||
bool _enabled = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder<bool>(
|
||||
future: SentryController.getSentryStatus(),
|
||||
builder: (context, snapshot) {
|
||||
_enabled = snapshot.data ?? false;
|
||||
return SwitchListTile.adaptive(
|
||||
title: Text(widget.label),
|
||||
value: _enabled,
|
||||
onChanged: (b) =>
|
||||
SentryController.toggleSentryAction(context, b).then(
|
||||
(_) => setState(() {}),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue