   }
 
   private func update(descriptor: EventDescriptor, with eventView: EventView) {
-    if let currentTimeline = pagingViewController.viewControllers?.first as? TimelineContainerController {
+    if let currentTimeline = currentTimeline {
       let timeline = currentTimeline.timeline
       let eventFrame = eventView.frame
       let converted = convert(eventFrame, to: timeline)


  public func scrollToFirstEventIfNeeded() {
    if autoScrollToFirstEvent {
      if let controller = pagingViewController.viewControllers?.first as? TimelineContainerController {
        controller.container.scrollToFirstEvent()
      }
    }

  }

  private func commitEditing() {
    if let currentTimeline = currentTimeline {
      let timeline = currentTimeline.timeline
      timeline.accentedDate = nil
      setNeedsDisplay()
