mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 09:50:16 +00:00
Change to use deselect instead of selecting a nil indexPath since deselect still animates correctly on iOS 14.
This commit is contained in:
1 parent
18726d061d
commit
8cffd206ec
1 file changed
+10
-6
@@ -40,15 +40,19 @@ class UpdateSelectionOperation: MainThreadOperation {
|
||||
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations)
|
||||
CATransaction.commit()
|
||||
} else {
|
||||
if animations.contains(.select) {
|
||||
CATransaction.begin()
|
||||
CATransaction.setCompletionBlock {
|
||||
if let indexPath = tableView.indexPathForSelectedRow {
|
||||
if animations.contains(.select) {
|
||||
CATransaction.begin()
|
||||
CATransaction.setCompletionBlock {
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
CATransaction.commit()
|
||||
} else {
|
||||
tableView.deselectRow(at: indexPath, animated: false)
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
CATransaction.commit()
|
||||
} else {
|
||||
tableView.selectRow(at: nil, animated: false, scrollPosition: .none)
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user