From e67136f0266eca7ebad93bbcbe4e21368c4a9df4 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Fri, 11 Feb 2022 07:33:49 +0800 Subject: [PATCH] prefetching disabled --- .../NotificationsViewController.swift | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/iOS/Settings/NotificationsViewController.swift b/iOS/Settings/NotificationsViewController.swift index 61034ba5c..82f8d07db 100644 --- a/iOS/Settings/NotificationsViewController.swift +++ b/iOS/Settings/NotificationsViewController.swift @@ -40,6 +40,7 @@ class NotificationsViewController: UIViewController { title = NSLocalizedString("New Article Notifications", comment: "Notifications") navigationItem.searchController = searchController + notificationsTableView.isPrefetchingEnabled = false filterButton = UIBarButtonItem( title: nil, @@ -75,18 +76,18 @@ class NotificationsViewController: UIViewController { guard let webFeed = notification.userInfo?[UserInfoKey.webFeed] as? WebFeed else { return } if let visibleIndexPaths = notificationsTableView.indexPathsForVisibleRows { - prefetchedIndexPaths.formUnion(visibleIndexPaths) - } - let allIndexPaths = Array(prefetchedIndexPaths) - - for path in allIndexPaths { - if let cell = notificationsTableView.cellForRow(at: path) as? NotificationsTableViewCell { - if cell.feed! == webFeed { - notificationsTableView.reconfigureRows(at: [path]) - return + for path in visibleIndexPaths { + if let cell = notificationsTableView.cellForRow(at: path) as? NotificationsTableViewCell { + if cell.feed! == webFeed { + notificationsTableView.reconfigureRows(at: [path]) + + return + } } } } + + } @objc