INNER CODE UNIT · TypeScript

setUnreadBadge

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

function setUnreadBadge(count: number) {
  if (process.platform === "darwin")
    app.dock?.setBadge(count ? String(count) : "");
  else if (process.platform === "linux") app.setBadgeCount(count);
}

function clearMailIndicators() {
  unreadByContents.clear();
  applyUnreadBadge();
  for (const notification of mailNotifications.values()) notification.close();
  mailNotifications.clear();
}

function readLastAppUrl(): string | null {
  try {
    return fs.readFileSync(userDataFile(LAST_APP_URL_FILE), "utf8");
  } catch {
    return null;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…