Disable row insertion animations
This commit is contained in:
parent
f2e08e96f3
commit
20c602f911
|
@ -94,10 +94,12 @@ class BookmarksTableViewController: EnhancedTableViewController {
|
|||
self.statuses.append(contentsOf: newStatuses.map { ($0.id, .unknown) })
|
||||
|
||||
DispatchQueue.main.async {
|
||||
UIView.performWithoutAnimation {
|
||||
self.tableView.insertRows(at: newIndexPaths, with: .automatic)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
||||
return true
|
||||
|
|
|
@ -143,11 +143,13 @@ class NotificationsTableViewController: EnhancedTableViewController {
|
|||
self.older = pagination?.older
|
||||
|
||||
DispatchQueue.main.async {
|
||||
UIView.performWithoutAnimation {
|
||||
self.tableView.insertRows(at: newIndexPaths, with: .automatic)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
||||
return true
|
||||
|
@ -224,7 +226,9 @@ class NotificationsTableViewController: EnhancedTableViewController {
|
|||
let newIndexPaths = (0..<groups.count).map {
|
||||
IndexPath(row: $0, section: 0)
|
||||
}
|
||||
UIView.performWithoutAnimation {
|
||||
self.tableView.insertRows(at: newIndexPaths, with: .automatic)
|
||||
}
|
||||
|
||||
self.refreshControl?.endRefreshing()
|
||||
|
||||
|
|
|
@ -106,11 +106,13 @@ class TimelineTableViewController: EnhancedTableViewController {
|
|||
let newIndexPaths = newRows.map { IndexPath(row: $0, section: self.timelineSegments.count - 1) }
|
||||
self.timelineSegments[self.timelineSegments.count - 1].append(contentsOf: newStatuses.map { ($0.id, .unknown) })
|
||||
DispatchQueue.main.async {
|
||||
UIView.performWithoutAnimation {
|
||||
self.tableView.insertRows(at: newIndexPaths, with: .none)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
|
||||
return true
|
||||
|
@ -142,7 +144,9 @@ class TimelineTableViewController: EnhancedTableViewController {
|
|||
let newIndexPaths = (0..<newStatuses.count).map {
|
||||
IndexPath(row: $0, section: 0)
|
||||
}
|
||||
UIView.performWithoutAnimation {
|
||||
self.tableView.insertRows(at: newIndexPaths, with: .automatic)
|
||||
}
|
||||
|
||||
self.refreshControl?.endRefreshing()
|
||||
|
||||
|
|
Loading…
Reference in New Issue