╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────────╮ │src/ui/UserSettings.zig│ ╰───────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │26 return session.data.user_name orelse unreachable; │ │27 } │ │28 │ │29 -// the user tab's bottom label: the unread notification count, if any │ │30 -pub fn tabBottomLabel(session: *const ui.Session) ![]const u8 { │ │31 - if (session.data.unread_notifs == 0) return ""; │ │29 +// the unread notification count, empty while logged out │ │30 +pub fn notifCountLabel(session: *const ui.Session) ![]const u8 { │ │31 + if (session.data.user_id == null) return ""; │ │32 return session.page_arena.allocator().print("({d})", .{session.data.unread_notifs});│ │33 } │ │34 │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │35 +// the user tab's bottom label: the unread count, bold while any are unread │ │36 +pub fn tabBottomLabel(session: *const ui.Session) !wgt.Span { │ │37 + return .{ .text = try notifCountLabel(session), .style = .{ .bold = session.data.unread_notifs > 0 } };│ │38 +} │ │39 + │ │40 pub const View = struct { │ │41 // a vertical box holding the centered form, scrolled when it outgrows the window │ │42 box: wgt.Box(ui.Widget), │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯