diff --git a/iOS/MasterFeed/UpdateSelectionOperation.swift b/iOS/MasterFeed/UpdateSelectionOperation.swift index 7a4820586..287e093db 100644 --- a/iOS/MasterFeed/UpdateSelectionOperation.swift +++ b/iOS/MasterFeed/UpdateSelectionOperation.swift @@ -40,8 +40,17 @@ class UpdateSelectionOperation: MainThreadOperation { tableView.selectRowAndScrollIfNotVisible(at: indexPath, animations: animations) CATransaction.commit() } else { - tableView.selectRow(at: nil, animated: animations.contains(.select), scrollPosition: .none) - self.operationDelegate?.operationDidComplete(self) + if animations.contains(.select) { + CATransaction.begin() + CATransaction.setCompletionBlock { + 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) + } } } else { self.operationDelegate?.operationDidComplete(self)