INNER CODE UNIT · TypeScript
restoreAppWindows
elie222/inbox-zero · apps/desktop/src/main.ts:372
function restoreAppWindows() {
for (const state of readStoredWindowStates()) createAppWindow(state);
if (windows.length === 0) createAppWindow();
}
function createAppWindow(options?: {
url?: string;
bounds?: DesktopWindowBounds;
isMaximized?: boolean;
}) {
const existing = windows[0];
if (windows.length === 1 && existing && !existing.isVisible()) {
if (options?.url) existing.loadURL(options.url).catch(() => {});
showWindow(existing);
return existing;
}
const startUrl = resolveDesktopStartUrl({