         if timesViewLayout.centerIndexPath != centerIndexPath {
             timesViewLayout.centerIndexPath = centerIndexPath
             
-            UIView.animate(withDuration: 0.6, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, animations: {
+            let actions = {
                 self.timesViewLayout.invalidateLayout()
-            })
+            }
+            
+            if animated {
+                UIView.animate(withDuration: 0.6, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, animations: actions)
+            } else {
+                actions()
+            }
         }
     }
 }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        
        updateTimesViewLayoutIfNeeded()
    }
    
    private func setupNavigationBar() {

extension CalendarViewController: UIScrollViewDelegate {
    func scrollViewDidScroll(_ scrollView: UIScrollView) {
        eventsView.contentOffset = scrollView.contentOffset
        invalidateTimesViewLayoutIfNeeded(animated: true)
    }
    
    func invalidateTimesViewLayoutIfNeeded(animated: Bool) {
        let indexPaths = timesView.indexPathsForVisibleItems.sorted()
        if indexPaths.isEmpty {
            return
