Parcourir la source

Do nothing in query_sent and query_result handlers

theenglishway (time) il y a 4 ans
Parent
commit
dda5c8e95f
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      lib/vaccins_web/live/index.ex

+ 2 - 4
lib/vaccins_web/live/index.ex

@@ -67,7 +67,7 @@ defmodule VaccinsWeb.IndexLive do
 
   @impl true
   def handle_info({:query_sent, id, ref}, socket = %{assigns: %{pending: pending}}) do
-    {:noreply, socket |> assign(pending: pending |> Map.put(ref, id))}
+    {:noreply, socket}
   end
 
   def handle_info(:periodic_refresh, socket = %{assigns: %{display_cs: false}}),
@@ -105,9 +105,7 @@ defmodule VaccinsWeb.IndexLive do
         {:query_result, ref, res},
         socket = %{assigns: %{locations: valid, pending: pending}}
       ) do
-    id = pending |> Map.get(ref)
-    send_update(VaccinsWeb.LocationComponent, id: id, availabilities: res)
-    {:noreply, socket |> assign(pending: pending |> Map.delete(ref))}
+    {:noreply, socket}
   end
 
   def handle_info({:location_availabilities, id, res}, socket = %{assigns: %{locations: valid}}) do