mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-03 12:27:32 +01:00
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)
|
tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations)
|
||||||
CATransaction.commit()
|
CATransaction.commit()
|
||||||
} else {
|
} else {
|
||||||
|
if let indexPath = tableView.indexPathForSelectedRow {
|
||||||
if animations.contains(.select) {
|
if animations.contains(.select) {
|
||||||
CATransaction.begin()
|
CATransaction.begin()
|
||||||
CATransaction.setCompletionBlock {
|
CATransaction.setCompletionBlock {
|
||||||
self.operationDelegate?.operationDidComplete(self)
|
self.operationDelegate?.operationDidComplete(self)
|
||||||
}
|
}
|
||||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
tableView.deselectRow(at: indexPath, animated: true)
|
||||||
CATransaction.commit()
|
CATransaction.commit()
|
||||||
} else {
|
} else {
|
||||||
tableView.selectRow(at: nil, animated: false, scrollPosition: .none)
|
tableView.deselectRow(at: indexPath, animated: false)
|
||||||
|
self.operationDelegate?.operationDidComplete(self)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
self.operationDelegate?.operationDidComplete(self)
|
self.operationDelegate?.operationDidComplete(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user