Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing event when checkout #275

Merged
merged 4 commits into from
Feb 29, 2024
Merged

fix missing event when checkout #275

merged 4 commits into from
Feb 29, 2024

Conversation

Leeeon233
Copy link
Member

When the doc is attached, it uses the diff_calc in LoroDoc, and the depth of ContainerDiffCalculator may still be the old cached value. That causes the diff_calc to believe that the depth is inconsistent and the container may have been deleted. So we cannot receive the event.

Maybe we should have a better way to determine whether the container is deleted.

@Leeeon233 Leeeon233 requested a review from zxch3n February 28, 2024 11:49
@Leeeon233 Leeeon233 self-assigned this Feb 28, 2024
@@ -262,24 +262,15 @@ impl DiffCalculator {
InternalContainerDiff {
idx,
bring_back,
is_container_deleted: are_rest_containers_deleted,
is_container_deleted: false,
Copy link
Member Author

Choose a reason for hiding this comment

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

Don’t we need to determine this anymore?

Copy link
Member

Choose a reason for hiding this comment

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

It seems like we don't need this field

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll test it in another branch.

@Leeeon233 Leeeon233 merged commit d3844ce into main Feb 29, 2024
1 check passed
@Leeeon233 Leeeon233 deleted the leon/fix-checkout-event branch February 29, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants