fix: filter sidebar blocks when switching graphs

close #3743
This commit is contained in:
Tienson Qin
2022-01-04 17:09:42 +08:00
parent a393d9f933
commit 351b126de7
3 changed files with 8 additions and 2 deletions

View File

@@ -1622,3 +1622,9 @@
(defn get-visual-viewport-state
[]
(:ui/visual-viewport-state @state))
(defn sub-right-sidebar-blocks
[]
(when-let [current-repo (get-current-repo)]
(->> (sub :sidebar/blocks)
(filter #(= (first %) current-repo)))))