     override func viewDidLayoutSubviews() {
         super.viewDidLayoutSubviews()
         
-        updateTimesViewLayoutIfNeeded()
+        invalidateTimesViewLayoutIfNeeded(animated: false)
     }
     
     private func setupNavigationBar() {

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

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
