From 341beecf73a752df1c4fdbddd70f2054e73b0ec0 Mon Sep 17 00:00:00 2001 From: Seth Foster Date: Mon, 18 Mar 2024 16:05:51 -0400 Subject: [PATCH] add some todos --- app-shell-odd/src/main.ts | 2 ++ app-shell-odd/src/ui.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/app-shell-odd/src/main.ts b/app-shell-odd/src/main.ts index 88ea6c78d9e..f536f56f96c 100644 --- a/app-shell-odd/src/main.ts +++ b/app-shell-odd/src/main.ts @@ -127,6 +127,8 @@ function startUp(): void { systemd.ready() const stopWatching = watchForMassStorage(dispatch) ipcMain.once('quit', stopWatching) + // TODO: This is where we render the main window for the first time. See ui.ts + // in the createUI function for more. if (!!!mainWindow) { log.error('mainWindow went away before show') } else { diff --git a/app-shell-odd/src/ui.ts b/app-shell-odd/src/ui.ts index f1bf84bad44..76e3dc6df36 100644 --- a/app-shell-odd/src/ui.ts +++ b/app-shell-odd/src/ui.ts @@ -45,6 +45,11 @@ export function createUi(dispatch: Dispatch): BrowserWindow { log.debug('Creating main window', { options: WINDOW_OPTS }) const mainWindow = new BrowserWindow(WINDOW_OPTS) + // TODO: In the app, we immediately do .once('ready-to-show', () => { mainWindow.show() }). We don't do that + // here because in electron 27.0.0 for some reason ready-to-show isn't firing, so instead we use "the app sent + // something via IPC" as our signifier that the window can bw shown. This happens in main.ts. + // This is a worrying thing to have to do, and it would be good to stop doing it. We'll have to change this + // further when we upgrade past 27. log.info(`Loading ${url}`) // eslint-disable-next-line @typescript-eslint/no-floating-promises