Skip to content

Stop note map simulation if not visible#4183

Closed
FliegendeWurst wants to merge 1 commit intoTriliumNext:masterfrom
FliegendeWurst:notemapAutoStop
Closed

Stop note map simulation if not visible#4183
FliegendeWurst wants to merge 1 commit intoTriliumNext:masterfrom
FliegendeWurst:notemapAutoStop

Conversation

@FliegendeWurst
Copy link
Copy Markdown
Member

Without this fix, Trilium will be sluggish for a while (usually less than a minute) after closing a large note map.

} else {
const activeChild = this.getActiveRibbonWidget();
if (activeChild) {
activeChild.handleEvent('deactivated', {});
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using a new event here since I did not find any existing mechanism to shut down a widget.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried cleanup() method in TypeWidget (inherited in NoteMapTypeWidget)? Seems to me it could be used for this. Although it would not work for Ribbon specifically ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter as much for the Ribbon widget, but could still be relevant for cases like #2608

@eliandoran eliandoran deleted the branch TriliumNext:master June 21, 2025 14:45
@eliandoran eliandoran closed this Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants