mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-28 07:19:32 +01:00
Merge branch 'soru/fix-sentry' into 'main'
fix: Sentry and small null fix See merge request ChristianPauly/fluffychat-flutter!251
This commit is contained in:
commit
3d2e059cb8
@ -173,7 +173,7 @@ class UserBottomSheet extends StatelessWidget {
|
|||||||
subtitle:
|
subtitle:
|
||||||
Text(presence.getLocalizedLastActiveAgo(context)),
|
Text(presence.getLocalizedLastActiveAgo(context)),
|
||||||
trailing: Icon(Icons.circle,
|
trailing: Icon(Icons.circle,
|
||||||
color: presence.presence.currentlyActive
|
color: presence.presence.currentlyActive ?? false
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: Colors.grey),
|
: Colors.grey),
|
||||||
),
|
),
|
||||||
|
@ -18,6 +18,8 @@ import 'views/chat_list.dart';
|
|||||||
void main() {
|
void main() {
|
||||||
SystemChrome.setSystemUIOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(
|
||||||
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
|
SystemUiOverlayStyle(statusBarColor: Colors.transparent));
|
||||||
|
FlutterError.onError = (FlutterErrorDetails details) =>
|
||||||
|
Zone.current.handleUncaughtError(details.exception, details.stack);
|
||||||
runZonedGuarded(
|
runZonedGuarded(
|
||||||
() => runApp(App()),
|
() => runApp(App()),
|
||||||
SentryController.captureException,
|
SentryController.captureException,
|
||||||
|
@ -2,6 +2,7 @@ import 'package:bot_toast/bot_toast.dart';
|
|||||||
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
import 'package:fluffychat/components/dialogs/simple_dialogs.dart';
|
||||||
import 'package:fluffychat/config/app_config.dart';
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:sentry/sentry.dart';
|
import 'package:sentry/sentry.dart';
|
||||||
|
|
||||||
@ -31,8 +32,7 @@ abstract class SentryController {
|
|||||||
static void captureException(error, stackTrace) async {
|
static void captureException(error, stackTrace) async {
|
||||||
debugPrint(error.toString());
|
debugPrint(error.toString());
|
||||||
debugPrint(stackTrace.toString());
|
debugPrint(stackTrace.toString());
|
||||||
final storage = Store();
|
if (!kDebugMode && await getSentryStatus()) {
|
||||||
if (await storage.getItem('sentry') == 'true') {
|
|
||||||
await sentry.captureException(
|
await sentry.captureException(
|
||||||
exception: error,
|
exception: error,
|
||||||
stackTrace: stackTrace,
|
stackTrace: stackTrace,
|
||||||
|
Loading…
Reference in New Issue
Block a user