fix: regression on distinguishing tagged blocks on sidebar

related to LOG-3214. Also create helper for common uses of object?
This commit is contained in:
Gabriel Horner
2024-09-05 09:52:09 -04:00
parent 4bd1275fda
commit 1a47978111
7 changed files with 16 additions and 9 deletions

View File

@@ -241,13 +241,12 @@
(defn- block-item
[repo block current-page !input]
(let [id (:block/uuid block)
object? (seq (:block/tags block))
text (title/block-unique-title block)
icon "letter-n"]
{:icon icon
:icon-theme :gray
:text (highlight-content-query text @!input)
:header (when-not object? (block/breadcrumb {:search? true} repo id {}))
:header (when-not (ldb/object? block) (block/breadcrumb {:search? true} repo id {}))
:current-page? (when-let [page-id (:block/page block)]
(= page-id (:block/uuid current-page)))
:source-block block}))