Skip to content

Commit 68ba923

Browse files
committed
[trello.com/c/7YVA2NTe] syntactic improve
1 parent e835eb1 commit 68ba923

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Adamant/Modules/Chat/View/Subviews/ChatMedia/Container/ChatMediaContainerView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,7 @@ extension ChatMediaContainerView {
214214
func totalUploadProgress() -> Double {
215215
let files = model.content.fileModel.files
216216

217-
let totalBytes: Int64 = files.reduce(0) { result, file in
218-
result + file.file.size
219-
}
217+
let totalBytes = files.map { $0.file.size }.reduce(0, +)
220218

221219
let uploadedBytes: Int64 = files.reduce(0) { result, file in
222220
let progress = Double(file.progress ?? 0) / 100.0

0 commit comments

Comments
 (0)