Skip to content

Commit 7a1a74e

Browse files
committed
Remove unused code and move update to get-current-state
1 parent 73250d4 commit 7a1a74e

File tree

1 file changed

+8
-12
lines changed
  • lib/lightning_web/live/workflow_live

1 file changed

+8
-12
lines changed

lib/lightning_web/live/workflow_live/edit.ex

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,15 +1478,6 @@ defmodule LightningWeb.WorkflowLive.Edit do
14781478
|> push_patch(to: url)
14791479
end
14801480

1481-
@impl true
1482-
def handle_event("get-initial-state", _params, socket) do
1483-
{:noreply,
1484-
socket
1485-
|> push_event("current-workflow-params", %{
1486-
workflow_params: socket.assigns.workflow_params
1487-
})}
1488-
end
1489-
14901481
@impl true
14911482
def handle_event("workflow_editor_metrics_report", params, socket) do
14921483
UiMetrics.log_workflow_editor_metrics(
@@ -1498,7 +1489,13 @@ defmodule LightningWeb.WorkflowLive.Edit do
14981489
end
14991490

15001491
def handle_event("get-current-state", _params, socket) do
1501-
{:reply, %{workflow_params: socket.assigns.workflow_params}, socket}
1492+
%{workflow_params: workflow_params, current_user: current_user} =
1493+
socket.assigns
1494+
1495+
{:reply,
1496+
%{
1497+
workflow_params: update_jobs_with_chat_info(workflow_params, current_user)
1498+
}, socket}
15021499
end
15031500

15041501
def handle_event(
@@ -2654,8 +2651,7 @@ defmodule LightningWeb.WorkflowLive.Edit do
26542651
socket
26552652
|> assign(
26562653
changeset: changeset,
2657-
workflow_params:
2658-
update_jobs_with_chat_info(workflow_params, socket.assigns.current_user)
2654+
workflow_params: workflow_params
26592655
)
26602656
end
26612657

0 commit comments

Comments
 (0)