bjsi/incremental-writing

"Bulk add from search" button disappears when changing workspace

linduxed opened this issue · 0 comments

The button for bulk adding from search (in the search sidebar section) disappears for me if one switches between the workspaces.

Currently the code that adds the button can be found here:

this.app.workspace.onLayoutReady(async () => {
this.createStatusBar();
const queuePath = this.getDefaultQueuePath();
await this.loadQueue(queuePath);
this.createTagMap();
this.checkTagsOnModified();
this.addSearchButton();
this.autoAddNewNotesOnCreate();
});

Specifically this line:

this.addSearchButton();

I'm guessing that addSearchButton should be called for some workspace-related event, but currently is not, but I'm ignorant on the topic, so this is just a guess.