Prevent auto-start when unread crash reports exist

This commit is contained in:
世界
2026-04-10 21:20:46 +08:00
parent 76772e20f8
commit 21b59cffef

View File

@@ -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()
}