port toc widget button

This commit is contained in:
Jin
2025-02-26 00:53:15 +01:00
parent 8b2788fa8c
commit d28dfc2b64
5 changed files with 67 additions and 54 deletions

View File

@@ -329,7 +329,7 @@ export default class TocWidget extends RightPanelWidget {
appContext.triggerEvent("reEvaluateTocWidgetVisibility", { noteId: this.noteId });
}
async showTocWidgetEvent({ noteId }: EventData<"showToc">) {
async showTocWidgetEvent({ noteId }: EventData<"showTocWidget">) {
if (this.noteId === noteId) {
await this.refresh();
this.triggerCommand("reEvaluateRightPaneVisibility");