INNER CODE UNIT · TypeScript
createAppWindow
elie222/inbox-zero · apps/desktop/src/main.ts:377
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({
requestedUrl: options?.url,
localMailUrl,
homeUrl,
rendererFile: localMailRendererFile,
});