Skip to content

Commit 56019e5

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ 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()) {
153+
// Avoid events related to the current tab interfere with our popup.
154+
if (["noteSwitched", "noteSwitchedAndActivated", "exportAsPdf", "printActiveNote"].includes(name)) {
155155
return Promise.resolve();
156156
}
157157

158-
// Avoid events related to the current tab interfere with our popup.
159-
if (["noteSwitched", "noteSwitchedAndActivated", "exportAsPdf", "printActiveNote"].includes(name)) {
158+
// Avoid not showing recent notes when creating a new empty tab.
159+
if ("noteContext" in data && data.noteContext.ntxId !== "_popup-editor") {
160160
return Promise.resolve();
161161
}
162162

0 commit comments

Comments
 (0)