mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add debug info for archive upload progress.
This commit is contained in:
@@ -76,6 +76,27 @@ class LogSectionRemoteBackups : LogSection {
|
||||
output.append("None\n")
|
||||
}
|
||||
|
||||
output.append("\n -- ArchiveUploadProgress\n")
|
||||
if (SignalStore.backup.archiveUploadState != null) {
|
||||
output.append("State: ${SignalStore.backup.archiveUploadState}\n")
|
||||
output.append("Pending bytes: ${SignalDatabase.attachments.getPendingArchiveUploadBytes()}\n")
|
||||
|
||||
val pendingAttachments = SignalDatabase.attachments.debugGetPendingArchiveUploadAttachments()
|
||||
if (pendingAttachments.isNotEmpty()) {
|
||||
output.append("Pending attachments:\n")
|
||||
output.append(" Count: ${pendingAttachments.size}\n")
|
||||
output.append(" Sum of Size: ${pendingAttachments.sumOf { it.size }}\n")
|
||||
output.append(" Content types:\n")
|
||||
pendingAttachments.groupBy { it.contentType }.forEach { (contentType, attachments) ->
|
||||
output.append(" $contentType: ${attachments.size}\n")
|
||||
}
|
||||
} else {
|
||||
output.append("Pending attachments: None!\n")
|
||||
}
|
||||
} else {
|
||||
output.append("None\n")
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user