mirror of https://github.com/logseq/logseq
Fix issue of journal not changed after drag and drop
parent
aeea29adf1
commit
b63712bbe4
|
@ -59,7 +59,7 @@
|
|||
(if (and sidebar? (empty? raw-page-headings))
|
||||
(do
|
||||
(state/sidebar-remove-block! (:sidebar/idx option))
|
||||
[:div "Deleted"])
|
||||
[:div "Empty"])
|
||||
(let [page-name (if heading?
|
||||
(:page/name (db/entity repo (:db/id (:heading/page (first raw-page-headings)))))
|
||||
page-name)
|
||||
|
|
|
@ -289,25 +289,24 @@
|
|||
current-tag (get-current-tag)
|
||||
current-page-id (get-current-page-id)
|
||||
{:heading/keys [page]} (first headings)
|
||||
handler-keys (when-let [page-id (:db/id page)]
|
||||
(->>
|
||||
handler-keys (->>
|
||||
(util/concat-without-nil
|
||||
(map
|
||||
(mapcat
|
||||
(fn [heading]
|
||||
[:headings (:heading/uuid heading)])
|
||||
(let [page-id (:db/id (:heading/page heading))]
|
||||
[[:headings (:heading/uuid heading)]
|
||||
[:page/headings page-id]
|
||||
[:page/ref-pages page-id]]))
|
||||
headings)
|
||||
|
||||
;; affected tag
|
||||
(when current-tag
|
||||
[[:tag/ref-headings current-tag]])
|
||||
|
||||
;; affected page
|
||||
[
|
||||
[:page/headings page-id]
|
||||
[:page/ref-pages page-id]
|
||||
[:page/ref-pages current-page-id]
|
||||
(when current-page-id
|
||||
[[:page/ref-pages current-page-id]
|
||||
[:page/refed-headings current-page-id]
|
||||
[:page/mentioned-pages current-page-id]]
|
||||
[:page/mentioned-pages current-page-id]])
|
||||
|
||||
;; refed-pages
|
||||
(apply concat
|
||||
|
@ -315,7 +314,7 @@
|
|||
(map (fn [page]
|
||||
[:page/refed-headings (:db/id page)])
|
||||
ref-pages))))
|
||||
(distinct)))
|
||||
(distinct))
|
||||
refed-pages (map
|
||||
(fn [[k page-id]]
|
||||
(if (= k :page/refed-headings)
|
||||
|
|
|
@ -1381,10 +1381,10 @@
|
|||
{:key :heading/change
|
||||
:data heading-changes}
|
||||
[[path new-file-content]]))
|
||||
;; (alter-file to-heading-repo
|
||||
;; path
|
||||
;; new-file-content
|
||||
;; {:re-render-root? true})
|
||||
(alter-file to-heading-repo
|
||||
path
|
||||
new-file-content
|
||||
{:re-render-root? true})
|
||||
))
|
||||
|
||||
;; same repo but different files
|
||||
|
@ -1450,7 +1450,7 @@
|
|||
to-after-headings
|
||||
modified-time)
|
||||
{:key :heading/change
|
||||
:data (conj heading-changes to-heading)}
|
||||
:data (conj heading-changes target-heading)}
|
||||
[[target-file-path new-target-file-content]
|
||||
[to-file-path new-to-file-content]])))
|
||||
|
||||
|
|
Loading…
Reference in New Issue