fix(timestamp): clear editing state before setting timestamp

If editing state is on in other block, submitting the timestamp to
current block will also add a timestamp to the block.
This commit is contained in:
leizhe
2021-12-15 15:15:43 +08:00
committed by Tienson Qin
parent 719f10b863
commit 2694568f70

View File

@@ -108,10 +108,10 @@
block-id (or (:block/uuid (state/get-edit-block))
(:block/uuid block))
typ (or @commands/*current-command typ)]
(state/clear-edit!)
(editor-handler/set-block-timestamp! block-id
typ
text)
(state/clear-edit!)
(when show?
(reset! show? false))))
(clear-timestamp!)