From e94c4cab7f79657f8b514b4af6c4e459e9b42961 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 17 Jan 2016 14:56:31 -0500 Subject: Avoid automatic actions that change the color to fire subsequent events --- app/Model/TaskPosition.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/Model/TaskPosition.php') diff --git a/app/Model/TaskPosition.php b/app/Model/TaskPosition.php index 762f7fe3..091d908d 100644 --- a/app/Model/TaskPosition.php +++ b/app/Model/TaskPosition.php @@ -177,11 +177,14 @@ class TaskPosition extends Base ); if ($task['swimlane_id'] != $new_swimlane_id) { - $this->container['dispatcher']->dispatch(Task::EVENT_MOVE_SWIMLANE, new TaskEvent($event_data)); + $this->logger->debug('Event fired: '.Task::EVENT_MOVE_SWIMLANE); + $this->dispatcher->dispatch(Task::EVENT_MOVE_SWIMLANE, new TaskEvent($event_data)); } elseif ($task['column_id'] != $new_column_id) { - $this->container['dispatcher']->dispatch(Task::EVENT_MOVE_COLUMN, new TaskEvent($event_data)); + $this->logger->debug('Event fired: '.Task::EVENT_MOVE_COLUMN); + $this->dispatcher->dispatch(Task::EVENT_MOVE_COLUMN, new TaskEvent($event_data)); } elseif ($task['position'] != $new_position) { - $this->container['dispatcher']->dispatch(Task::EVENT_MOVE_POSITION, new TaskEvent($event_data)); + $this->logger->debug('Event fired: '.Task::EVENT_MOVE_POSITION); + $this->dispatcher->dispatch(Task::EVENT_MOVE_POSITION, new TaskEvent($event_data)); } } } -- cgit v1.2.3