Skip to content

Commit

Permalink
check index
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed Dec 3, 2024
1 parent 281e3ce commit 78c911c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions iOSClient/Media/NCMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ class NCMedia: UIViewController {

if !fileExists {
if let index = dataSource.metadatas.firstIndex(where: {$0.ocId == ocId}),
index < self.dataSource.metadatas.count,
let cell = collectionView.cellForItem(at: IndexPath(row: index, section: 0)) as? NCMediaCell,
dataSource.metadatas[index].ocId == cell.ocId {
indexPaths.append(IndexPath(row: index, section: 0))
Expand Down

0 comments on commit 78c911c

Please sign in to comment.