Skip to content

Delegate called twice: dayView(dayView: DayView, didUpdate event: EventDescriptor) #356

Open
@MadalinSava

Description

@MadalinSava

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:

  1. handlePanGesture is called and since the state is ended, it calls commitEditing
  2. the snap animation starts
  3. immediately, before the animation ends, timelineDidLongPress is called
  4. since editedEventView is still there (animation did not finish and completionHandler was not called to set it to nil), the animation starts again
  5. the completion handler is called for both animations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions