mirror of https://github.com/logseq/logseq
improve(api): event hook of after graph indexed
parent
5815f37df1
commit
09d43983f2
|
@ -412,6 +412,7 @@ export interface IAppProxy {
|
|||
|
||||
// hook events
|
||||
onCurrentGraphChanged: IUserHook
|
||||
onGraphAfterIndexed: IUserHook<{repo: string}>
|
||||
onThemeModeChanged: IUserHook<{ mode: 'dark' | 'light' }>
|
||||
onThemeChanged: IUserHook<Partial<{name: string, mode: string, pid: string, url: string}>>
|
||||
onBlockRendererSlotted: IUserSlotHook<{ uuid: BlockUUID }>
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
(db/set-key-value repo :ast/version db-schema/ast-version)
|
||||
(search-handler/rebuild-indices!)
|
||||
(db/persist! repo)
|
||||
(plugin-handler/hook-plugin-app :graph-after-indexed {:repo repo :empty-graph? empty-graph?})
|
||||
(when (state/setups-picker?)
|
||||
(if empty-graph?
|
||||
(route-handler/redirect! {:to :import :query-params {:from "picker"}})
|
||||
|
|
Loading…
Reference in New Issue