fix: create local versions on mobile if there's any conflict

This commit is contained in:
Tienson Qin
2022-10-12 14:17:14 +08:00
parent b8707cd719
commit 127a4d1613
3 changed files with 34 additions and 17 deletions

View File

@@ -640,7 +640,8 @@
(when (db/get-db graph)
(let [file (:block/file page-entity)]
(when-let [path (:file/path file)]
(when (not= content (:file/content file))
(when (and (not= content (:file/content file))
(:file/content file))
(sync/add-new-version-file graph path (:file/content file)))
(p/let [_ (file-handler/alter-file graph
path