mirror of https://github.com/logseq/logseq
fix(plugin): unnecessary re-render for the page header slots
parent
cd12e4e0dd
commit
adda2b6bf2
|
@ -474,6 +474,15 @@
|
|||
(when-let [path-page-name (get-path-page-name state page-name)]
|
||||
(util/page-name-sanity-lc path-page-name)))
|
||||
|
||||
(rum/defc lsp-pagebar-slot <
|
||||
rum/static
|
||||
[]
|
||||
(when (not config/publishing?)
|
||||
(when config/lsp-enabled?
|
||||
[:div.flex.flex-row
|
||||
(plugins/hook-ui-slot :page-head-actions-slotted nil)
|
||||
(plugins/hook-ui-items :pagebar)])))
|
||||
|
||||
;; A page is just a logical block
|
||||
(rum/defcs ^:large-vars/cleanup-todo page-inner < rum/reactive db-mixins/query
|
||||
(rum/local false ::all-collapsed?)
|
||||
|
@ -543,11 +552,7 @@
|
|||
:preview? preview?
|
||||
:*hover? (::hover-title? state)
|
||||
:*show-page-info? (::show-page-info? state)}))
|
||||
(when (not config/publishing?)
|
||||
(when config/lsp-enabled?
|
||||
[:div.flex.flex-row
|
||||
(plugins/hook-ui-slot :page-head-actions-slotted nil)
|
||||
(plugins/hook-ui-items :pagebar)]))])
|
||||
(lsp-pagebar-slot)])
|
||||
|
||||
(cond
|
||||
(and db-based? (not block?))
|
||||
|
|
Loading…
Reference in New Issue