export async function setStreakBadge(streak) {
  if (!("setAppBadge" in navigator)) return;
  try {
    if (streak > 0) await navigator.setAppBadge(streak);
    else await navigator.clearAppBadge();
  } catch { /* unsupported */ }
}

export async function clearBadge() {
  if (!("clearAppBadge" in navigator)) return;
  try { await navigator.clearAppBadge(); } catch { /* noop */ }
}
