Skip to content

Commit

Permalink
NCScan added check array
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana committed Oct 21, 2024
1 parent bd94633 commit 07a937e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion iOSClient/Scan document/NCScan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,14 @@ class NCScan: UIViewController, NCScanCellCellDelegate {
}

func imageTapped(with index: Int, sender: Any) {
guard index < self.itemsSource.count else {
return collectionViewSource.reloadData()
}
let fileName = self.itemsSource[index]
let fileNamePath = utilityFileSystem.directoryScan + "/" + fileName
guard let data = try? Data(contentsOf: URL(fileURLWithPath: fileNamePath)), let image = UIImage(data: data) else { return }
guard let data = try? Data(contentsOf: URL(fileURLWithPath: fileNamePath)), let image = UIImage(data: data) else {
return collectionViewSource.reloadData()
}

imagesDestination.append(image)
itemsDestination.append(fileName)
Expand Down

0 comments on commit 07a937e

Please sign in to comment.