mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 12:15:31 +00:00
Reorganize settings:
- Add new setting to disable error uploading - Move "about" info to a separate view
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import "dart:io";
|
||||
|
||||
import "package:device_info_plus/device_info_plus.dart";
|
||||
import 'package:inventree/app_settings.dart';
|
||||
import "package:package_info_plus/package_info_plus.dart";
|
||||
import "package:sentry_flutter/sentry_flutter.dart";
|
||||
|
||||
@ -94,6 +95,13 @@ Future<bool> sentryReportMessage(String message, {Map<String, String>? context})
|
||||
return true;
|
||||
}
|
||||
|
||||
final upload = await InvenTreeSettingsManager().getValue(INV_REPORT_ERRORS, true) as bool;
|
||||
|
||||
if (!upload) {
|
||||
print("----- Error reporting disabled -----");
|
||||
return true;
|
||||
}
|
||||
|
||||
Sentry.configureScope((scope) {
|
||||
scope.setExtra("server", server_info);
|
||||
scope.setExtra("app", app_info);
|
||||
@ -129,6 +137,13 @@ Future<void> sentryReportError(dynamic error, dynamic stackTrace) async {
|
||||
return;
|
||||
}
|
||||
|
||||
final upload = await InvenTreeSettingsManager().getValue(INV_REPORT_ERRORS, true) as bool;
|
||||
|
||||
if (!upload) {
|
||||
print("----- Error reporting disabled -----");
|
||||
return;
|
||||
}
|
||||
|
||||
final server_info = getServerInfo();
|
||||
final app_info = await getAppInfo();
|
||||
final device_info = await getDeviceInfo();
|
||||
|
Reference in New Issue
Block a user