an experimental irc client

ui: show unread highlight indicator

+6 -2
+6 -2
src/irc.zig
··· 387 387 .channel => |channel| { 388 388 if (channel == self and self.messageViewIsAtBottom()) { 389 389 self.has_unread = false; 390 + self.has_unread_highlight = false; 390 391 } 391 392 }, 392 393 } 393 394 } 394 395 if (self.has_unread) style.fg = .{ .index = 4 }; 395 - 396 + const prefix: vxfw.RichText.TextSpan = if (self.has_unread_highlight) 397 + .{ .text = " ●︎", .style = .{ .fg = .{ .index = 1 } } } 398 + else 399 + .{ .text = " " }; 396 400 const text: vxfw.RichText = if (std.mem.startsWith(u8, self.name, "#")) 397 401 .{ 398 402 .text = &.{ 399 - .{ .text = " " }, 403 + prefix, 400 404 .{ .text = "#", .style = .{ .fg = .{ .index = 8 } } }, 401 405 .{ .text = self.name[1..], .style = style }, 402 406 },