Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/jupyter-server-ydoc/jupyter_server_ydoc/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ def _on_document_change(self, target: str, event: Any) -> None:
document. This tasks are debounced (60 seconds by default) so we
need to cancel previous tasks before creating a new one.
"""
remove_duplicate_cells = getattr(self._document, "remove_duplicate_cells", None)
if target == "cells" and remove_duplicate_cells is not None:
asyncio.get_running_loop().call_soon(remove_duplicate_cells)

Comment on lines +250 to +253
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I still see that as an abstraction leak.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point. adding an observe cells callback to handle in jupyter-server/jupyter_ydoc#397

# Collect autosave values from all clients
autosave_states = [
state.get("autosave", True)
Expand Down
Loading