Skip to content

Commit

Permalink
refactor: remove useless notifyNavigatorSaveTiddler because I don't n…
Browse files Browse the repository at this point in the history
…eed it

I was using tiddloid so need it. But now tidgi-desktop don't need this
  • Loading branch information
linonetwo committed Oct 30, 2023
1 parent 3a9106f commit 33ece70
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/slate-write/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class SlateWriteWidget extends Widget<IEditorAppProps> {
return;
}
$tw.wiki.setText(this.editTitle, undefined, undefined, newText);
notifyNavigatorSaveTiddler(this.editTitle, this.parentWidget);
this.unlock();
};
return {
Expand Down Expand Up @@ -173,21 +172,6 @@ class SlateWriteWidget extends Widget<IEditorAppProps> {
}
}

function notifyNavigatorSaveTiddler(title: string, parentWidget?: TWWidget) {
window.requestIdleCallback(
() => {
parentWidget?.dispatchEvent({
type: 'tm-save-tiddler',
// param: param,
paramObject: { suppressNavigation: 'yes' },
tiddlerTitle: title,
});
parentWidget?.dispatchEvent({ type: 'tm-auto-save-wiki' });
},
{ timeout: 2000 },
);
}

declare let exports: {
widget: typeof SlateWriteWidget;
};
Expand Down

0 comments on commit 33ece70

Please sign in to comment.