mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-20 21:04:17 +08:00
Make sure to reflect the dirty status when cell content changes (#465)
This commit is contained in:
parent
ed8fac44ef
commit
943d8b6059
1 changed files with 9 additions and 1 deletions
|
@ -1181,7 +1181,9 @@ defmodule LivebookWeb.SessionLive do
|
|||
data_view
|
||||
|
||||
{:apply_cell_delta, _pid, cell_id, _delta, _revision} ->
|
||||
update_cell_view(data_view, data, cell_id)
|
||||
data_view
|
||||
|> update_cell_view(data, cell_id)
|
||||
|> update_dirty_status(data)
|
||||
|
||||
_ ->
|
||||
data_to_view(data)
|
||||
|
@ -1198,4 +1200,10 @@ defmodule LivebookWeb.SessionLive do
|
|||
cell_view
|
||||
)
|
||||
end
|
||||
|
||||
# Changes that affect only a single cell are still likely to
|
||||
# have impact on dirtyness, so we need to always mirror it
|
||||
defp update_dirty_status(data_view, data) do
|
||||
put_in(data_view.dirty, data.dirty)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue