mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-21 21:36:17 +08:00
Update file infos then running_files changed (#772)
This commit is contained in:
parent
feb0ac214e
commit
c9b21f221d
1 changed files with 3 additions and 1 deletions
|
@ -48,10 +48,12 @@ defmodule LivebookWeb.FileSelectComponent do
|
||||||
def update(assigns, socket) do
|
def update(assigns, socket) do
|
||||||
{force_reload?, assigns} = Map.pop(assigns, :force_reload, false)
|
{force_reload?, assigns} = Map.pop(assigns, :force_reload, false)
|
||||||
|
|
||||||
|
running_files_changed? = assigns.running_files != (socket.assigns[:running_files] || [])
|
||||||
|
|
||||||
socket =
|
socket =
|
||||||
socket
|
socket
|
||||||
|> assign(assigns)
|
|> assign(assigns)
|
||||||
|> update_file_infos(force_reload?)
|
|> update_file_infos(force_reload? or running_files_changed?)
|
||||||
|
|
||||||
{:ok, socket}
|
{:ok, socket}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue