mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Reorganize settings:
- Add new setting to disable error uploading - Move "about" info to a separate view
This commit is contained in:
parent
27da8b2820
commit
f1a46be417
8 changed files with 270 additions and 161 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue