Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

mob/photos: gate unhandled logging in debug

Neeraj Gupta6df3bc9d1c6a
diff --git a/mobile/apps/photos/lib/core/error-reporting/super_logging.dart b/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
index 4f62860c97..f1ce6d3393 100644
--- a/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
+++ b/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
@@ -266,10 +266,17 @@ class SuperLogging {
return event;
};
},
- appRunner: () => _runWithUnhandledErrorLogging(appConfig!.body!),
+ appRunner: () => kDebugMode
+ ? _runWithUnhandledErrorLogging(appConfig!.body!)
+ : appConfig!.body!(),
);
} else {
- await _runWithUnhandledErrorLogging(appConfig.body!);
+ if (kDebugMode) {
+ // Keep debug-only until we're sure this doesn't cause regressions.
+ await _runWithUnhandledErrorLogging(appConfig.body!);
+ } else {
+ await appConfig.body!();
+ }
}
}