diff --git a/packages/docmanager/package.json b/packages/docmanager/package.json index ecd56609422d..3af937e913df 100644 --- a/packages/docmanager/package.json +++ b/packages/docmanager/package.json @@ -54,6 +54,7 @@ "@lumino/coreutils": "^2.1.2", "@lumino/disposable": "^2.1.2", "@lumino/messaging": "^2.0.1", + "@lumino/polling": "^2.1.2", "@lumino/properties": "^2.0.1", "@lumino/signaling": "^2.1.2", "@lumino/widgets": "^2.3.1", diff --git a/packages/docmanager/src/recents.ts b/packages/docmanager/src/recents.ts index d69ee7fa5cca..6c71825c7854 100644 --- a/packages/docmanager/src/recents.ts +++ b/packages/docmanager/src/recents.ts @@ -197,7 +197,7 @@ export class RecentsManager implements IRecentsManager, IDisposable { return a.root !== this._serverRoot ? 1 : -1; } }); - this.saveRecents(); + this._saveDebouncer.invoke().catch(console.warn); } /** @@ -237,13 +237,6 @@ export class RecentsManager implements IRecentsManager, IDisposable { return invalidPathsOrNulls.filter(x => typeof x === 'string') as string[]; } - /** - * Save the recent items to the state with debouncing. - */ - protected saveRecents(): void { - this._saveDebouncer.invoke(); - } - /** * Save the recent items to the state. */ diff --git a/yarn.lock b/yarn.lock index 2107c641249e..660236904b22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2901,6 +2901,7 @@ __metadata: "@lumino/coreutils": ^2.1.2 "@lumino/disposable": ^2.1.2 "@lumino/messaging": ^2.0.1 + "@lumino/polling": ^2.1.2 "@lumino/properties": ^2.0.1 "@lumino/signaling": ^2.1.2 "@lumino/widgets": ^2.3.1