From 20c602f911fac82116c3628a5382636de4e76cfc Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 26 Jan 2020 18:23:18 -0500 Subject: [PATCH] Disable row insertion animations --- .../Bookmarks/BookmarksTableViewController.swift | 4 +++- .../NotificationsTableViewController.swift | 10 +++++++--- .../Screens/Timeline/TimelineTableViewController.swift | 8 ++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Tusker/Screens/Bookmarks/BookmarksTableViewController.swift b/Tusker/Screens/Bookmarks/BookmarksTableViewController.swift index 7809209740..641c864d54 100644 --- a/Tusker/Screens/Bookmarks/BookmarksTableViewController.swift +++ b/Tusker/Screens/Bookmarks/BookmarksTableViewController.swift @@ -94,7 +94,9 @@ class BookmarksTableViewController: EnhancedTableViewController { self.statuses.append(contentsOf: newStatuses.map { ($0.id, .unknown) }) DispatchQueue.main.async { - self.tableView.insertRows(at: newIndexPaths, with: .automatic) + UIView.performWithoutAnimation { + self.tableView.insertRows(at: newIndexPaths, with: .automatic) + } } } } diff --git a/Tusker/Screens/Notifications/NotificationsTableViewController.swift b/Tusker/Screens/Notifications/NotificationsTableViewController.swift index 09c22e4a95..414323f740 100644 --- a/Tusker/Screens/Notifications/NotificationsTableViewController.swift +++ b/Tusker/Screens/Notifications/NotificationsTableViewController.swift @@ -143,7 +143,9 @@ class NotificationsTableViewController: EnhancedTableViewController { self.older = pagination?.older DispatchQueue.main.async { - self.tableView.insertRows(at: newIndexPaths, with: .automatic) + UIView.performWithoutAnimation { + self.tableView.insertRows(at: newIndexPaths, with: .automatic) + } } } } @@ -224,8 +226,10 @@ class NotificationsTableViewController: EnhancedTableViewController { let newIndexPaths = (0..