mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 18:32:55 +00:00
Remove prefetching.
This commit is contained in:
1 parent
e0096cd2a4
commit
35ae2068c1
3 files changed
-70
No files matched your search
@@ -182,7 +182,6 @@ final class MainTimelineViewController: UIViewController, UndoableCommandRunner
|
||||
|
||||
assert(dataSource != nil)
|
||||
configureCollectionView(dataSource!)
|
||||
collectionView?.prefetchDataSource = self
|
||||
|
||||
configureSearchController()
|
||||
definesPresentationContext = true
|
||||
@@ -555,23 +554,6 @@ final class MainTimelineViewController: UIViewController, UndoableCommandRunner
|
||||
|
||||
}
|
||||
|
||||
// MARK: - UICollectionViewDataSourcePrefetching
|
||||
|
||||
extension MainTimelineViewController: UICollectionViewDataSourcePrefetching {
|
||||
/// Thumbnails download behind visible thumbnails.
|
||||
func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) {
|
||||
guard let thumbnailMode, let dataSource else {
|
||||
return
|
||||
}
|
||||
// Index paths are nearest first, and the most recent request starts first.
|
||||
for indexPath in indexPaths.reversed() {
|
||||
if let article = dataSource.itemIdentifier(for: indexPath), let thumbnailURL = ArticleThumbnailFinder.shared.thumbnailURL(for: article, mode: thumbnailMode) {
|
||||
ArticleThumbnailFinder.shared.prefetchThumbnail(url: thumbnailURL, mode: thumbnailMode, articleTitle: article.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UICollectionViewDelegate
|
||||
|
||||
extension MainTimelineViewController: UICollectionViewDelegate {
|
||||
|
||||
Reference in new issue
Block a user