Ensure we only mark on scroll when the setting is enabled

This commit is contained in:
Maurice Parker
2023-03-09 19:43:06 -06:00
parent 76419dc47f
commit 986260b101

View File

@@ -434,7 +434,8 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
}
override func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath) {
guard let firstVisible = tableView.indexPathsForVisibleRows?.first,
guard AppDefaults.shared.markArticlesAsReadOnScroll,
let firstVisible = tableView.indexPathsForVisibleRows?.first,
indexPath < firstVisible,
let article = dataSource.itemIdentifier(for: indexPath),
article.status.read == false,