From 88bc15da7f2e9a882476fa0eabda129e6dfdb824 Mon Sep 17 00:00:00 2001 From: rcmerci Date: Fri, 13 Dec 2024 21:10:00 +0800 Subject: [PATCH] fix(rtc): add :remove case for update-remote-data-by-local-unpushed-ops --- src/main/frontend/worker/rtc/remote_update.cljs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/frontend/worker/rtc/remote_update.cljs b/src/main/frontend/worker/rtc/remote_update.cljs index 32ffc614e6c..264847d2bb5 100644 --- a/src/main/frontend/worker/rtc/remote_update.cljs +++ b/src/main/frontend/worker/rtc/remote_update.cljs @@ -289,6 +289,13 @@ remote-op)] (assoc affected-blocks-map block-uuid remote-op*)) affected-blocks-map)) + :remove + ;; TODO: if this block's updated by others, we shouldn't remove it + ;; but now, we don't know who updated this block recv from remote + ;; once we have this attr(:block/updated-by, :block/created-by), we can finish this TODO + (let [block-uuid (:block-uuid local-op-value)] + (dissoc affected-blocks-map block-uuid)) + ;;else affected-blocks-map))) affected-blocks-map local-unpushed-ops))