Skip to content

Commit 7dd517d

Browse files
committed
fix (empty tab): recent notes not showing when creating a empty tab
1 parent d8e9cad commit 7dd517d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/client/src/widgets/dialogs/popup_editor.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ export default class PopupEditorDialog extends Container<BasicWidget> {
150150
}
151151

152152
handleEventInChildren<T extends EventNames>(name: T, data: EventData<T>): Promise<unknown[] | unknown> | null {
153+
// Avoid not showing recent notes when creating a new empty tab.
154+
if (name === 'activeContextChanged' && "noteContext" in data && data.noteContext.isEmpty()) {
155+
return Promise.resolve();
156+
}
157+
153158
// Avoid events related to the current tab interfere with our popup.
154159
if (["noteSwitched", "noteSwitchedAndActivated", "exportAsPdf", "printActiveNote"].includes(name)) {
155160
return Promise.resolve();

0 commit comments

Comments
 (0)