INNER CODE UNIT · TypeScript

readStoredWindowStates

elie222/inbox-zero · apps/desktop/src/main.ts:525

function readStoredWindowStates() {
  try {
    return parseDesktopWindowStates(
      JSON.parse(fs.readFileSync(userDataFile(WINDOWS_STATE_FILE), "utf8")),
      appOrigin,
    );
  } catch {
    return parseDesktopWindowStates([{ url: readLastAppUrl() }], appOrigin);
  }
}

function schedulePersistWindows() {
  clearTimeout(persistWindowsTimer);
  persistWindowsTimer = setTimeout(persistWindowsNow, 200);
}

function persistWindowsNow() {
  clearTimeout(persistWindowsTimer);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…