Bolded text for accounts with unread emails #84

Closed
opened 2026-07-02 02:04:12 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-02 02:04:12 +00:00 (Migrated from github.com)

Context

With 2+ accounts, the drawer's account switcher (AccountSwitcher, FolderDrawer.kt:106-127) and the
mailbox's account filter chips (AccountFilterRow, MailboxScreen.kt:405-426) both render each account
as plain Text(account.email) — no visual cue for which accounts currently have unread mail, so checking
means opening each one.

Proposed behavior

An account with unread mail renders its email in bold (FontWeight.Bold), the same convention
MessageRow already uses for unread messages (MailboxScreen.kt:452:
fontWeight = if (message.isRead) FontWeight.Normal else FontWeight.Bold). Reverts to normal weight
once that account has no unread mail.

Suggested approach

Needs the same per-account unread aggregation as #83 (ideally the same underlying query/flow — see open
question below for scope). Once a Map<accountId, Int> (or a Set<accountId> of "has unread") is
available from the repository:

  • AccountSwitcher (FolderDrawer.kt:106-127): bold the current-account button label and each
    DropdownMenuItem row's Text(account.email) when that account has unread mail.
  • AccountFilterRow (MailboxScreen.kt:405-426): same treatment on each FilterChip's label.

Open question

Should "unread" mean the account's INBOX only, or unread mail anywhere (any folder)? Inbox-only is
simpler, matches what the unified view surfaces by default, and avoids counting mail a user filed away
(e.g. Spam) as if it needed attention. Suggest scoping to INBOX unless there's a reason otherwise —
worth deciding once and reusing for #83 too.

Acceptance criteria

  • Account rows in the drawer switcher and the mailbox filter chips render bold when that account has
    unread mail, normal weight otherwise.
  • "Unread" scope is consistent with wherever #83 lands.
## Context With 2+ accounts, the drawer's account switcher (`AccountSwitcher`, `FolderDrawer.kt:106-127`) and the mailbox's account filter chips (`AccountFilterRow`, `MailboxScreen.kt:405-426`) both render each account as plain `Text(account.email)` — no visual cue for which accounts currently have unread mail, so checking means opening each one. ## Proposed behavior An account with unread mail renders its email in bold (`FontWeight.Bold`), the same convention `MessageRow` already uses for unread messages (`MailboxScreen.kt:452`: `fontWeight = if (message.isRead) FontWeight.Normal else FontWeight.Bold`). Reverts to normal weight once that account has no unread mail. ## Suggested approach Needs the same per-account unread aggregation as #83 (ideally the same underlying query/flow — see open question below for scope). Once a `Map<accountId, Int>` (or a `Set<accountId>` of "has unread") is available from the repository: - `AccountSwitcher` (`FolderDrawer.kt:106-127`): bold the current-account button label and each `DropdownMenuItem` row's `Text(account.email)` when that account has unread mail. - `AccountFilterRow` (`MailboxScreen.kt:405-426`): same treatment on each `FilterChip`'s label. ## Open question Should "unread" mean the account's INBOX only, or unread mail anywhere (any folder)? Inbox-only is simpler, matches what the unified view surfaces by default, and avoids counting mail a user filed away (e.g. Spam) as if it needed attention. Suggest scoping to INBOX unless there's a reason otherwise — worth deciding once and reusing for #83 too. ## Acceptance criteria - [ ] Account rows in the drawer switcher and the mailbox filter chips render bold when that account has unread mail, normal weight otherwise. - [ ] "Unread" scope is consistent with wherever #83 lands.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#84