Skip to content

Commit

Permalink
restore didEndDisplaying ... was disappeared (#2621)
Browse files Browse the repository at this point in the history
Signed-off-by: Marino Faggiana <[email protected]>
  • Loading branch information
marinofaggiana authored Oct 4, 2023
1 parent 869b84f commit ac568b7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,12 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
}
}

func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { }
func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
if !collectionView.indexPathsForVisibleItems.contains(indexPath) {
guard let metadata = dataSource.cellForItemAt(indexPath: indexPath) else { return }
NCOperationQueue.shared.cancelDownloadThumbnail(metadata: metadata)
}
}

func numberOfSections(in collectionView: UICollectionView) -> Int {
return dataSource.numberOfSections()
Expand Down

0 comments on commit ac568b7

Please sign in to comment.