Prevent auto-start when unread crash reports exist

This commit is contained in:
世界
2026-07-06 21:15:23 +08:00
parent 7c41b4bea8
commit 47f7d3c8fd
@@ -21,6 +21,11 @@ class BootReceiver : BroadcastReceiver() {
}
GlobalScope.launch(Dispatchers.IO) {
if (Settings.startedByUser) {
CrashReportManager.refresh()
if (CrashReportManager.unreadCount.value > 0) {
Settings.startedByUser = false
return@launch
}
withContext(Dispatchers.Main) {
BoxService.start()
}