MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / queueNoteOpenForWindow

Function queueNoteOpenForWindow

apps/desktop/src/main/index.ts:394–403  ·  view source on GitHub ↗
(win: BrowserWindow, relPath: string)

Source from the content-addressed store, hash-verified

392// window's renderer reports ready so the request isn't dropped on a
393// freshly created window.
394function queueNoteOpenForWindow(win: BrowserWindow, relPath: string): void {
395 if (win.isDestroyed()) return
396 if (readyWindowIds.has(win.id)) {
397 dispatchOpenNoteRequest(win, relPath)
398 return
399 }
400 const list = pendingWindowNoteOpens.get(win.id) ?? []
401 list.push(relPath)
402 pendingWindowNoteOpens.set(win.id, list)
403}
404
405function flushWindowNoteOpens(win: BrowserWindow): void {
406 const list = pendingWindowNoteOpens.get(win.id)

Callers 2

openMarkdownFileFromOSFunction · 0.85
registerIpcFunction · 0.85

Calls 1

dispatchOpenNoteRequestFunction · 0.85

Tested by

no test coverage detected