this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

ui: highlight msg time when msg has nick. send notifs

+9 -5
+9 -5
src/irc.zig
··· 929 929 ); 930 930 }; 931 931 932 + // If the message has our nick, we'll highlight the time 933 + if (std.mem.indexOf(u8, content, self.client.config.nick)) |_| { 934 + style.fg = .{ .index = 3 }; 935 + style.reverse = true; 936 + } 937 + 932 938 const time_text: vxfw.Text = .{ 933 939 .text = buf, 934 940 .style = style, ··· 1582 1588 self.config.name orelse self.config.server, 1583 1589 self.read_buf.items[i..idx], 1584 1590 }); 1585 - self.handleEvent(self.read_buf.items[i..idx]) catch |err| { 1591 + self.handleEvent(self.read_buf.items[i..idx], ctx) catch |err| { 1586 1592 log.err("error: {}", .{err}); 1587 1593 }; 1588 1594 } 1589 1595 self.read_buf.replaceRangeAssumeCapacity(0, i, ""); 1590 1596 } 1591 1597 1592 - pub fn handleEvent(self: *Client, line: []const u8) !void { 1598 + pub fn handleEvent(self: *Client, line: []const u8, ctx: *vxfw.EventContext) !void { 1593 1599 const msg: Message = .{ .bytes = line }; 1594 1600 const client = self; 1595 1601 switch (msg.command()) { ··· 2025 2031 @memcpy(buf[0..len], channel.name[0..len]); 2026 2032 break :title buf[0..len]; 2027 2033 }; 2028 - _ = title; 2029 - // TODO: fix this 2030 - // try self.vx.notify(writer, title, content); 2034 + try ctx.sendNotification(title, content); 2031 2035 has_highlight = true; 2032 2036 } 2033 2037 const time = msg2.time() orelse return;