INNER CODE UNIT · TypeScript

syncUpdateProgressBar

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

function syncUpdateProgressBar() {
  const onView = windows.some(
    (window) => window.isFocused() && window.isVisible(),
  );
  const progress =
    downloadPercent === null || !onView
      ? -1
      : Math.min(1, Math.max(0, downloadPercent / 100));
  for (const window of windows) {
    if (!window.isDestroyed()) window.setProgressBar(progress);
  }
}

function restoreAppWindows() {
  for (const state of readStoredWindowStates()) createAppWindow(state);
  if (windows.length === 0) createAppWindow();
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…