mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
Add command to re-index graph
This commit is contained in:
committed by
Tienson Qin
parent
112100471c
commit
af8c0ee148
@@ -17,6 +17,8 @@
|
||||
[frontend.state :as state]
|
||||
[frontend.util :refer [mac?] :as util]
|
||||
[frontend.commands :as commands]
|
||||
[electron.ipc :as ipc]
|
||||
[promesa.core :as p]
|
||||
[clojure.data :as data]
|
||||
[medley.core :as medley]))
|
||||
|
||||
@@ -291,6 +293,11 @@
|
||||
:graph/save {:fn #(state/pub-event! [:graph/save])
|
||||
:binding false}
|
||||
|
||||
:graph/re-index {:fn (fn []
|
||||
(p/let [multiple-windows? (ipc/ipc "graphHasMultipleWindows" (state/get-current-repo))]
|
||||
(state/pub-event! [:graph/ask-for-re-index multiple-windows?])))
|
||||
:binding false}
|
||||
|
||||
:command/run {:binding "mod+shift+1"
|
||||
:inactive (not (util/electron?))
|
||||
:fn #(do
|
||||
@@ -459,6 +466,7 @@
|
||||
:graph/remove
|
||||
:graph/add
|
||||
:graph/save
|
||||
:graph/re-index
|
||||
:editor/cycle-todo
|
||||
:editor/up
|
||||
:editor/down
|
||||
@@ -643,6 +651,7 @@
|
||||
:graph/remove
|
||||
:graph/add
|
||||
:graph/save
|
||||
:graph/re-index
|
||||
:sidebar/clear
|
||||
:sidebar/open-today-page
|
||||
:search/re-index
|
||||
|
||||
Reference in New Issue
Block a user