tangled
alpha
login
or
join now
rockorager.dev
/
comlink
2
fork
atom
an experimental irc client
2
fork
atom
overview
issues
pulls
pipelines
ui: show unread highlight indicator
rockorager.dev
1 year ago
f6f2b301
48de27bb
+6
-2
1 changed file
expand all
collapse all
unified
split
src
irc.zig
+6
-2
src/irc.zig
···
387
387
.channel => |channel| {
388
388
if (channel == self and self.messageViewIsAtBottom()) {
389
389
self.has_unread = false;
390
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
395
-
396
396
+
const prefix: vxfw.RichText.TextSpan = if (self.has_unread_highlight)
397
397
+
.{ .text = " ●︎", .style = .{ .fg = .{ .index = 1 } } }
398
398
+
else
399
399
+
.{ .text = " " };
396
400
const text: vxfw.RichText = if (std.mem.startsWith(u8, self.name, "#"))
397
401
.{
398
402
.text = &.{
399
399
-
.{ .text = " " },
403
403
+
prefix,
400
404
.{ .text = "#", .style = .{ .fg = .{ .index = 8 } } },
401
405
.{ .text = self.name[1..], .style = style },
402
406
},