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