Change to use deselect instead of selecting a nil indexPath since deselect still animates correctly on iOS 14.
This commit is contained in:
parent
18726d061d
commit
8cffd206ec
|
@ -40,15 +40,19 @@ class UpdateSelectionOperation: MainThreadOperation {
|
|||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations)
|
||||
CATransaction.commit()
|
||||
} else {
|
||||
if let indexPath = tableView.indexPathForSelectedRow {
|
||||
if animations.contains(.select) {
|
||||
CATransaction.begin()
|
||||
CATransaction.setCompletionBlock {
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
CATransaction.commit()
|
||||
} else {
|
||||
tableView.selectRow(at: nil, animated: false, scrollPosition: .none)
|
||||
tableView.deselectRow(at: indexPath, animated: false)
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
} else {
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue