Disables prefetching

This commit is contained in:
Stuart Breckenridge
2022-02-11 06:30:04 +08:00
parent e1f7cc80a9
commit d4a669ba1e
2 changed files with 1 additions and 6 deletions

View File

@@ -47,6 +47,7 @@ class NotificationsViewController: UIViewController {
menu: notificationFilterMenu())
navigationItem.rightBarButtonItem = filterButton
notificationsTableView.isPrefetchingEnabled = false
reloadNotificationTableView()
@@ -71,17 +72,13 @@ class NotificationsViewController: UIViewController {
@objc
private func updateCellsFrom(_ notification: Notification) {
guard let webFeed = notification.userInfo?[UserInfoKey.webFeed] as? WebFeed else { return }
print("NotificationTableView: Received WebFeedIcon for \(webFeed.nameForDisplay)")
let cell = notificationsTableView.visibleCells.filter({ ($0 as? NotificationsTableViewCell)?.feed == webFeed }).first as? NotificationsTableViewCell
if cell != nil {
if let indexPath = notificationsTableView.indexPath(for: cell!) {
notificationsTableView.reconfigureRows(at: [indexPath])
print("NotificationTableView: Reconfigured cell for \(webFeed.nameForDisplay)")
return
}
} else {
print("NotificationTableView: Cannot find cell for \(webFeed.nameForDisplay)")
}
}