mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-26 15:27:55 +00:00
fix(windows): the tray shows the logo alone unless the number icon is asked for
The number beside the logo is a second tray icon, the only way the notification area can carry text, and two icons read as clutter. It is now opt-in: a fresh install shows the logo, the figure stays in the tooltip and at the top of the tray menu, and the settings toggle brings the number icon back. Anyone who already chose either way keeps that choice. Startup no longer restores a badge from the status cache unless the setting asks for one.
This commit is contained in:
parent
fd9931666d
commit
790c2dd603
2 changed files with 15 additions and 3 deletions
|
|
@ -591,7 +591,12 @@ fn restore_tray_status(app: &AppHandle) {
|
|||
if let Some(tooltip) = status.tooltip.as_deref() {
|
||||
apply_tray_tooltip(app, tooltip);
|
||||
}
|
||||
if let Some(badge) = status.badge.as_deref() {
|
||||
// The number icon is opt-in; without the setting the tray shows the logo alone.
|
||||
let badge_wanted = settings::read()
|
||||
.get("trayBadge")
|
||||
.and_then(serde_json::Value::as_bool)
|
||||
.unwrap_or(false);
|
||||
if let (true, Some(badge)) = (badge_wanted, status.badge.as_deref()) {
|
||||
// Never restored dimmed: whether a paired device answers is this session's question,
|
||||
// and the first refresh dims it again if it still cannot be reached.
|
||||
let _ = apply_tray_badge(app, Some(badge), false);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,9 @@ export const DEFAULT_SETTINGS: AppSettings = {
|
|||
menubarScope: 'local',
|
||||
accent: 'ember',
|
||||
theme: 'system',
|
||||
trayBadge: true,
|
||||
// Off by default: a second tray icon for the number reads as clutter beside the logo, so
|
||||
// the figure lives in the tooltip and the menu until someone asks for it.
|
||||
trayBadge: false,
|
||||
usageRefreshSeconds: -1,
|
||||
quotaCadenceSeconds: 120,
|
||||
terminal: 'windowsTerminal',
|
||||
|
|
@ -166,7 +168,12 @@ function migrated(raw: Record<string, unknown>): Record<string, unknown> {
|
|||
const saved = readSetting('theme')
|
||||
if (saved === 'dark' || saved === 'light') next.theme = saved
|
||||
}
|
||||
if (next.trayBadge === undefined && readSetting('trayBadge') === 'off') next.trayBadge = false
|
||||
if (next.trayBadge === undefined) {
|
||||
// The badge used to default on; anyone who chose either way keeps their choice.
|
||||
const saved = readSetting('trayBadge')
|
||||
if (saved === 'on') next.trayBadge = true
|
||||
if (saved === 'off') next.trayBadge = false
|
||||
}
|
||||
return next
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue