Skip to content

Commit 8bf4f70

Browse files
fix crash
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
1 parent e7aac49 commit 8bf4f70

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

iOSClient/Main/Collection Common/Section Header Footer/NCSectionFirstHeader.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ class NCSectionFirstHeader: UICollectionReusableView, UIGestureRecognizerDelegat
148148
let fileIds = recommendations.map(\.id)
149149
let metadatas = await NCManageDatabase.shared.getMetadatasFromFileIdsAsync(fileIds)
150150
let etagsByFileId = Dictionary(
151-
uniqueKeysWithValues: metadatas.map { ($0.fileId, $0.etag) }
151+
metadatas.map { ($0.fileId, $0.etag) },
152+
uniquingKeysWith: { current, _ in current }
152153
)
153154
let newRecommendationsIdentity = recommendations.map {
154155
"\($0.id)|\($0.reason)|\(etagsByFileId[$0.id] ?? "")"

0 commit comments

Comments
 (0)