When I drag an event after long-pressing it (without releasing!), after dropping it I'm seeing the delegate function always called twice.
This is caused by the snap animation in commitEditing. What happens on mouse release:
handlePanGesture is called and since the state is ended, it calls commitEditing
- the snap animation starts
- immediately, before the animation ends,
timelineDidLongPress is called
- since
editedEventView is still there (animation did not finish and completionHandler was not called to set it to nil), the animation starts again
- the completion handler is called for both animations