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