From 222732f58d98ff9dede5082e3854ecca35ce1222 Mon Sep 17 00:00:00 2001 From: sorax Date: Tue, 13 Aug 2024 23:38:21 +0200 Subject: [PATCH] fix: add missing event --- assets/js/hooks/events/handler.ts | 2 +- lib/radiator_web/live/episode_live/index.ex | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/js/hooks/events/handler.ts b/assets/js/hooks/events/handler.ts index 1f503f97..7d4b897f 100644 --- a/assets/js/hooks/events/handler.ts +++ b/assets/js/hooks/events/handler.ts @@ -26,7 +26,7 @@ export function handleList({ nodes }: { nodes: Node[] }) { // focus last item const lastItem = container.lastElementChild as HTMLDivElement; - focusItem(lastItem); + focusItem(lastItem, true); } export function handleInsert({ diff --git a/lib/radiator_web/live/episode_live/index.ex b/lib/radiator_web/live/episode_live/index.ex index e20232f0..6cafc37d 100644 --- a/lib/radiator_web/live/episode_live/index.ex +++ b/lib/radiator_web/live/episode_live/index.ex @@ -62,6 +62,16 @@ defmodule RadiatorWeb.EpisodeLive.Index do |> reply(:noreply) end + def handle_event("set_collapsed", _node_id, socket) do + socket + |> reply(:noreply) + end + + def handle_event("set_expanded", _node_id, socket) do + socket + |> reply(:noreply) + end + def handle_event("create_node", params, socket) do user = socket.assigns.current_user episode = socket.assigns.selected_episode