We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e835eb1 commit 68ba923Copy full SHA for 68ba923
Adamant/Modules/Chat/View/Subviews/ChatMedia/Container/ChatMediaContainerView.swift
@@ -214,9 +214,7 @@ extension ChatMediaContainerView {
214
func totalUploadProgress() -> Double {
215
let files = model.content.fileModel.files
216
217
- let totalBytes: Int64 = files.reduce(0) { result, file in
218
- result + file.file.size
219
- }
+ let totalBytes = files.map { $0.file.size }.reduce(0, +)
220
221
let uploadedBytes: Int64 = files.reduce(0) { result, file in
222
let progress = Double(file.progress ?? 0) / 100.0
0 commit comments