Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin event opened-notebook & closed-notebook #11974

Closed
frostime opened this issue Jul 14, 2024 · 2 comments
Closed

Add plugin event opened-notebook & closed-notebook #11974

frostime opened this issue Jul 14, 2024 · 2 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

In what scenarios do you need this feature?

插件需要根据笔记本打开、关闭来决定是否重新执行一些查询,已获得最新的状态。

Describe the optimal solution

  • on-box-opened
    • {detail}: box id
    • when: 笔记本打开、并执行完重新索引之后
  • on-box-closed
    • {detail}: box id
    • when: 笔记本关闭之后

Describe the candidate solution

No response

Other information

No response

@88250 88250 added this to the 3.1.7 milestone Sep 11, 2024
@88250 88250 changed the title Plugin Event Request | on-box-opened & on-box-closed Add plugin event on-box-opened & on-box-closed Sep 12, 2024
@Vanessa219 Vanessa219 changed the title Add plugin event on-box-opened & on-box-closed Plugin Event Request | opened-notebook & closed-notebook Sep 12, 2024
@88250 88250 changed the title Plugin Event Request | opened-notebook & closed-notebook Add plugin Event opened-notebook & closed-notebook Sep 12, 2024
Vanessa219 added a commit that referenced this issue Sep 12, 2024
Vanessa219 added a commit to siyuan-note/plugin-sample that referenced this issue Sep 12, 2024
Vanessa219 added a commit to siyuan-note/petal that referenced this issue Sep 12, 2024
@88250
Copy link
Member

88250 commented Sep 12, 2024

when: 笔记本打开、并执行完重新索引之后

索引是否完成需要通过调用接口 /api/sqlite/flushTransaction 后才能确定。

@88250 88250 changed the title Add plugin Event opened-notebook & closed-notebook Add plugin event opened-notebook & closed-notebook Sep 12, 2024
@88250
Copy link
Member

88250 commented Sep 12, 2024

另外,也可以参考这个 #8814 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants