From f0e2bb8db6846f2b6cc40854b978015a3ca2844d Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 31 Dec 2020 23:20:53 -0500 Subject: [PATCH] Fix crash while cancelling prefetching of rows --- .../Screens/Utilities/TimelineLikeTableViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tusker/Screens/Utilities/TimelineLikeTableViewController.swift b/Tusker/Screens/Utilities/TimelineLikeTableViewController.swift index e8a1489f..65f9c57b 100644 --- a/Tusker/Screens/Utilities/TimelineLikeTableViewController.swift +++ b/Tusker/Screens/Utilities/TimelineLikeTableViewController.swift @@ -134,11 +134,11 @@ class TimelineLikeTableViewController: EnhancedTableViewController, Refres } willRemoveRows(at: indexPathsToRemove) - sections.removeSubrange(sectionsToRemove) - UIView.performWithoutAnimation { tableView.deleteSections(IndexSet(sectionsToRemove), with: .none) } + + sections.removeSubrange(sectionsToRemove) } else if lastVisibleRow.section == lastSectionIndex { let lastSection = sections.last! let lastRowIndex = lastSection.count - 1 @@ -146,7 +146,7 @@ class TimelineLikeTableViewController: EnhancedTableViewController, Refres if lastVisibleRow.row < lastRowIndex - pageSize { // if there are more than pageSize rows in the current section below the last visible one - let rowIndicesInLastSectionToRemove = (lastVisibleRow.row + 20)..